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 | |
| ################################################################# | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "Permission denied" | |
| exit 1 | |
| fi | |
| #The section above was found at askubuntu.com | |
| #Article name: "how-can-a-script-check-if-its-being-run-as-root" | |
| ################################################################# | |
| clear |
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 | |
| # gmail blocked the email from getting into the inbox. Maybe use mutt instead of sendemail? | |
| # original version (not mine): https://raspbianonpi.wordpress.com/2013/10/18/e-mail-wan-ip-address-on-change/ | |
| # original version uses website to determine wan ip | |
| user=my-login-name | |
| log_history="/home/$user/Scripts/wan-ip.history" | |
| # log_history: USE FULL PATH | |
| smtp="smtp.gmail.com:587" |