Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # DO NOT CHANGE THIS UNLESS UNRAID CHANGES BACKUP PATH
- backup_script="/usr/local/emhttp/webGui/scripts/flash_backup"
- # DO NOT CHANGE ABOVE THIS LINE
- # CONFIG START - CHANGE THIS
- dropbox_dir="/mnt/user/Dropbox/unRAID-backup/"
- # CONFIG END
- if [ ! -f "$backup_script" ]; then
- /usr/local/emhttp/webGui/scripts/notify -i alert -s "Backup script does not exist. Backup of USB not possible!"
- exit
- fi
- zip="$(${backup_script})"
- if [ ! -f "/$zip" ]; then
- /usr/local/emhttp/webGui/scripts/notify -i alert -s "Backup script ran successfully, however, backup file does not exist on disk!"
- exit
- fi
- mv "/${zip}" "${dropbox_dir}"
- chmod 777 "${dropbox_dir}/${zip}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement