@reboot /bin/mail -s “$HOSTNAME – rebooted” msn@rmoahn.com <<< “$HOSTNAME has rebooted on $(date)”
The ability to know when a system reboot. The tips below will send out an email when a Linux system is reboot. This should indicate to the Administrator that something went wrong with the shutdown. The tips below are for a Linux based system. There are two method as following :-
Method-1
# crontab -e
@reboot echo “ALERT – Server `hostname` has Restarted on `date`” | mutt -s “ALERT ::: System Rebooted `hostname`” info@msn.com
Method-2
# vim /etc/rc.local
echo “ALERT – Server `hostname` has Restarted on `date`” | mutt -s “ALERT ::: System Rebooted `hostname`” info@msn.com
Recent Comments