Skip to content

Instantly share code, notes, and snippets.

@oksage
oksage / deb9-openbox-64bit-POST-INSTALL-SCRIPT.sh
Last active January 26, 2019 07:50
This is a script for 'apt installing' openbox (etc) after installing debian 9 (stretch) netinstall (unselected the desktop environment during install)
#!/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
@oksage
oksage / wan-ip-change-detector.sh
Last active October 13, 2017 05:15
wan ip change emailer (uses dd-wrt to determine wan ip)
#!/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"