http://www.perlmonks.org?node_id=150093


in reply to Send message after server reboot

The best way would be to add it to the system start up script. /etc/rc.d/rc.local or something of that sort. If you can't do that, then you can go the cron route.

Linux (don't know about Solaris) has a command called 'last' that will have a line that shows when the system was rebooted. You can narrow the last output by the user which under Linux is 'reboot'. So 'last -1 reboot' would give you the last time the system was rebooted.

The other thing you need to do is keep track of the last reboot time that a notification was sent for, so that you don't double send.

HTH

/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"