Subversion Repositories configs

Rev

Go to most recent revision | Details | 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 apcupsd
5
# restores contact with the UPS (i.e. the serial connection is restored).
6
# We send an email message to root to notify him.
7
#
8
SYSADMIN=root
9
APCUPSD_MAIL="/bin/mail"
10
 
11
HOSTNAME=`hostname`
12
MSG="$HOSTNAME Communications with UPS restored"
13
#
14
(
15
   echo "Subject: $MSG"
16
   echo " "
17
   echo "$MSG"
18
   echo " "
19
   /sbin/apcaccess status
20
) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
21
exit 0