Tag Archives: scripting

Linux Startup Email

Want to receive an email any time your linux server reboots? Just create this script…

sudo nano /usr/local/sbin/startupemail.sh

Here’s the code for the script…


# Lets things startup
sleep 60

# Get info
IP="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"

#Send email
echo "IP: $IP, Host: $HOSTNAME" | mail -s "Server Started" me@there.com

Make sure to make it executable…

sudo chmod u+x /usr/local/sbin/startupemail.sh

Then add it to your /etc/rc.local file

Google App Launcher Keyboard Shortcut

If you’re using AutoHotKey (and I would recommend that you do), here’s a handy script for remapping the caps lock to show the app launcher (which is convenient if you’ve gotten used to a Chromebook)

SetCapsLockState, AlwaysOff
Capslock::Run, chrome.exe --show-app-list