Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Rclone sync
- rclone sync --stats 1s --log-level DEBUG --log-file "$log_file" --drive-chunk-size 256M /path/to/backup/location S3_Name:S3Bucketname
- # Check the exit code of the command
- if [ $? -eq 0 ]; then
- # Command #1 was successful, execute command #2
- /usr/local/emhttp/webGui/scripts/notify -t -s "Rclone Sync was successful" -d "Rclone Sync was successful" -i alert
- else
- # Command #1 failed, execute command #3
- /usr/local/emhttp/webGui/scripts/notify -t -s "Rclone Sync sync has failed" -d "Rclone Sync has failed" -i warning
- fi
Advertisement
Add Comment
Please, Sign In to add comment