Subversion Repositories configs

Rev

Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
#!/bin/sh
2
#
3
# This shell script if placed in /etc/apcupsd
4
# will be called by /etc/apcupsd/apccontrol when the
5
# UPS goes back on to the mains after a power failure.
6
# We send an email message to root to notify him.
7
#
8
 
9
HOSTNAME=`hostname`
17 - 10
MSG="$HOSTNAME UPS $1 Power has returned"
4 - 11
#
12
(
13
   echo "Subject: $MSG"
14
   echo " "
15
   echo "$MSG"
16
   echo " "
17
   /sbin/apcaccess status
18
) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
19
exit 0