Created
January 3, 2014 23:16
-
-
Save joshenders/8248594 to your computer and use it in GitHub Desktop.
Backup a DVD and send a pushover notification upon completion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
device='/dev/dvd' | |
label="$(blkid -o value -s LABEL ${device})" | |
log="${label}.log" | |
dvdbackup \ | |
--mirror \ | |
--progress \ | |
--verbose \ | |
--output="${label}" 2>&1 | tee "${log}" | |
token='' | |
user='' | |
message="Backup of ${label} complete" | |
url='https://api.pushover.net/1/messages.json' | |
curl \ | |
--silent \ | |
--form "token=${token}" \ | |
--form "user=${user}" \ | |
--form "message=${message}" \ | |
"${url}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment