Skip to content

Instantly share code, notes, and snippets.

@joshenders
Created January 3, 2014 23:16
Show Gist options
  • Save joshenders/8248594 to your computer and use it in GitHub Desktop.
Save joshenders/8248594 to your computer and use it in GitHub Desktop.
Backup a DVD and send a pushover notification upon completion
#!/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