Mail Notification of remote server reboot.
28 Aug
2002
28 Aug
'02
20:07
Hi,
I saw this tip today from UGU, and thought some of you
might find it useful for security of remote servers.
It was a ksh script, I converted to bash.
Put it in /etc/rc.d/notify , and make a symlink to it in /etc/rc2.d
ln -s /etc/rc.d/notify /etc/rc.d/rc2.d/S99notify
#############################################
#!/bin/sh
# Boot Notification Script
# /etc/rc2.d/S99notify - Sends e-mail notification to the
#administrators when the system is booted.
DATE=`date`
SRVNM=`uname -n`
# The next variable can be set for multiple addresses
# (i.e. jsmith@yahoo.com,jsmith@hotmail.com)
MAILADD=root@you.net
mail $MAILADD <
7920
Age (days ago)
7920
Last active (days ago)
0 comments
1 participants
participants (1)
-
zentara