Last active
May 23, 2017 14:17
-
-
Save simonmulser/3c9dd3a70e43e766a26cb629ba06c9ab to your computer and use it in GitHub Desktop.
Check if grive didn't finished and print error message to sdout. Crontab will then mail you with postifx (https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/).
This file contains 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 | |
grive -p /home/simon/grive >> /tmp/grive.log 2>&1 | |
if tail -1 /tmp/grive.log | grep -qv 'Finished!'; then | |
echo "There was en error executing grive. check /tmp/grive.log!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment