Marko Polo
Senior Member
So finally what was the working solution? What have you chosen in the end?
#!/bin/bash
log_dir="/mnt/-/backup-scans-log.txt"
config_dir="/mnt/-/rclone_config"
backup_dir="/mnt/-/shares/Scanned Documents/"
server_backup_dir="OneDrive:/Scanned Documents/"
function backup () {
rclone --config /mnt/-/rclone_config copy "$backup_dir" "$server_backup_dir" 2>&1 >>"$log_dir"
}
while true
do
inotifywait -r -e modify,attrib,close_write,move,create,delete --format '%T %:e %f' --timefmt '%c' "$backup_dir" 2>&1 >>"$log_dir" && backup
done
trap 'kill -HUP 0' EXIT
#!/bin/sh
swapon /tmp/mnt/-/myswap.swp # Added by amtm
. /jffs/addons/diversion/mount-entware.div # Added by amtm
/jffs/scripts/spdmerlin startup "$@" & # spdMerlin
/jffs/scripts/backup-scans
We use essential cookies to make this site work, and optional cookies to enhance your experience.