Email on reboot
Adam Funk
a24061 at ducksburg.com
Tue Aug 14 18:36:30 UTC 2007
On 2007-08-14, 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.
Put a line like this in your crontab:
@reboot dmesg | mail -s 'Reboot!' bart at example.com
This takes advantage of the Debian extensions to the crontab format.
More information about the ubuntu-users
mailing list