Skip to main content
1 of 2
AnFi
  • 1.6k
  • 7
  • 10

You can use sendmail directly to send the email.
Using custom shell script would make it "cleaner".

1 make crontab execute custom script

@reboot  .../reboot-notify

2 make the script use sendmail directly

#!/bin/sh
HOSTNAME=`hostname`    

/usr/sbin/sendmail -i [email protected] <<END
Subject: System restart

Server has restarted: $HOSTNAME
END
AnFi
  • 1.6k
  • 7
  • 10