Last active
August 29, 2015 14:16
-
-
Save hualro/42b5c2f5df3648970004 to your computer and use it in GitHub Desktop.
onmovie.sh
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 | |
# Author: Hugo Alvarado | |
# Date: March 8, 2015 | |
TODAY=$(date) | |
echo "Your log entry here: $TODAY" >> /path/to/your/movie.log | |
echo "Your text message here: $TODAY" | sudo /usr/bin/gammu sendsms TEXT 1112223344 2> /path/to/your/error.log | |
if [ "$?" = "0" ]; then | |
echo "SMS Sent" >> /path/to/your/movie.log | |
else | |
echo "Cannot send SMS" >> /path/to/your/movie.log | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment