Email on reboot

Brian Fahrlander brian at
Tue Aug 14 17:20:57 UTC 2007

Bart Silverstrim wrote:
> Is there a best-practices recommended way to have a 7.04 ubuntu server 
> email a specific address if it reboots or is restarted?  Emailing output 
> from dmesg or a system log at boot time would be nice, but as long as 
> there was some notification of the restart with a timestamp it would be 
> useful.  I know there's fifty ways to do it, but I wondered what people 
> found to be the easiest and "best" way to do it.

    Probably in /etc/rc.local, at the bottom.  Something like

echo "System rebooted." | mail -S"Notice" username at

  Brian Fahrländer                 Christian, Conservative, and Technomad
  Evansville, IN                    
  ICQ: 5119262                         AOL/Yahoo/GoogleTalk: WheelDweller

More information about the ubuntu-users mailing list