Guest User

Untitled

a guest
Jan 7th, 2023
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Rclone sync
  4. rclone sync --stats 1s --log-level DEBUG --log-file "$log_file" --drive-chunk-size 256M /path/to/backup/location S3_Name:S3Bucketname
  5.  
  6. # Check the exit code of the command
  7. if [ $? -eq 0 ]; then
  8. # Command #1 was successful, execute command #2
  9. /usr/local/emhttp/webGui/scripts/notify -t -s "Rclone Sync was successful" -d "Rclone Sync was successful" -i alert
  10. else
  11. # Command #1 failed, execute command #3
  12. /usr/local/emhttp/webGui/scripts/notify -t -s "Rclone Sync sync has failed" -d "Rclone Sync has failed" -i warning
  13. fi
  14.  
Advertisement
Add Comment
Please, Sign In to add comment