Script (Daemon) for sending email when system restarts
Last updated: November, 2009
download: systemEmail(shell script)
Description:
This script should be put in the /etc/init.d directory and be made executable (and add the proper email address). Add it to the proper run levels (using for example the command 'chkconfig' and make sure that it is the last script to be executed when the system starts up and the first when the system shuts down, to ensure it is able to use the email applications (see second line of the script). Sending an email during system restarts is escpecially helpful if you are hosting your system as a VPS so you can detect unexpected restarts from your provider.