Subversion Repositories configs

Rev

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

Rev Author Line No. Line
3 - 1
#!/bin/sh
2
#
3
# This shell script if placed in /etc/apcupsd
4
# will be called by /etc/apcupsd/apccontrol when apcupsd
5
# loses contact with the UPS (i.e. the serial connection is not responding).
6
# We send an email message to root to notify him.
7
#
8
 
9
HOSTNAME=`hostname`
16 - 10
MSG="$HOSTNAME Communications with UPS $1 lost"
3 - 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