SUMMARY: shutdown and reboot mail

From: Balamurugan.T <murugan.bala_at_kla-tencor.com>
Date: Fri Dec 12 2003 - 04:37:08 EST
this is the script what i was exactly looking..

Thanks to all for the quick reply.

Mr. Howard. Hurst gave correct solution for me.

This script does exactly what you are looking for....
----------------------------------------------------------------------------
-
#!/bin/ksh
#
# Solaris 2.X Boot Notification Script
# /etc/rc2.d/S99notify - Sends e-mail notification to administrators
# when the system is booted.
#
#*******************************************************************
PATH=/usr/sbin:/usr/bin
SRVNM=`uname -n`
# The next variable can be set for multiple addresses
# (i.e. jsmith@yahoo.com,jsmith@hotmail.com)
MAILADD=email@wherever.com
mail $MAILADD <<EOF
From: $0
To: $MAILADD
Subject: Boot of $SRVNM
$SRVNM has booted up.
If this is news to you, please investigate.
`date`
EOF
exit 0
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Dec 12 04:36:59 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:25 EST