Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2021
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # DO NOT CHANGE THIS UNLESS UNRAID CHANGES BACKUP PATH
  4. backup_script="/usr/local/emhttp/webGui/scripts/flash_backup"
  5. # DO NOT CHANGE ABOVE THIS LINE
  6.  
  7. # CONFIG START - CHANGE THIS
  8. dropbox_dir="/mnt/user/Dropbox/unRAID-backup/"
  9. # CONFIG END
  10.  
  11. if [ ! -f "$backup_script" ]; then
  12.     /usr/local/emhttp/webGui/scripts/notify -i alert -s "Backup script does not exist. Backup of USB not possible!"
  13.     exit
  14. fi
  15.  
  16. zip="$(${backup_script})"
  17.  
  18. if [ ! -f "/$zip" ]; then
  19.     /usr/local/emhttp/webGui/scripts/notify -i alert -s "Backup script ran successfully, however, backup file does not exist on disk!"
  20.     exit
  21. fi
  22.  
  23. mv "/${zip}" "${dropbox_dir}"
  24.  
  25. chmod 777 "${dropbox_dir}/${zip}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement