Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need a script to send an e-mail to system admin when a Solaris 7 server reboot.
Please send me a example script if anyone has the script available.
Thank you for help

Stan,
just put a script in /etc/rc2.d called K99reboot_notify . The contents could be something like:
#! /bin/sh
echo "Server `uname -n` going down for reboot at `date`" > /tmp/message.$$cat /tmp/message.$$ | mailx -s "`uname -n` reboot notice" you@mail.com
To get notice on startup, put a script in /etc/rc3.d called S99reboot_notice:
#! /bin/sh
echo "Server `uname -n` completing startup on `date`" > /tmp/message.$$cat /tmp/message.$$ | mailx -s "`uname -n` startup notice" you@mail.com
rm /tmp/message.$$
This is untested, but should work.
-jim

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |