This can / should be setup using nagios, but here it is anyway!
#!/bin/sh -e # HOST=`hostname` if [ -f /var/run/reboot-required ]; then #echo "Sytem will reboot in 5 minutes ..." | /usr/bin/wall #sleep 240 #echo "Sytem will reboot in 1 minute ..." | /usr/bin/wall #sleep 60 cat /var/run/reboot-required | mailx -s "Reboot required on $HOST" system@example.com #/sbin/reboot fi