Skip to content

Instantly share code, notes, and snippets.

@bradymholt
Created January 16, 2012 16:25
Show Gist options
  • Save bradymholt/1621619 to your computer and use it in GitHub Desktop.
Save bradymholt/1621619 to your computer and use it in GitHub Desktop.
Backup Mount Notifier
#!/bin/bash
[email protected]
BACKUP_LOCATION=/mount/backup
mountpoint -q $BACKUP_LOCATION
if [ $? == 0 ]; then
echo "$BACKUP_LOCATION is mounted!"
else
echo "$BACKUP_LOCATION is NOT mounted!" | mail -s "Backup Mount Status" $NOTIFY_EMAIL
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment