Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 37e222326095a93978d54b1564dd9954 > files > 9

apcupsd-3.10.5-1mdk.ppc.rpm

#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the master
# does not contact the slave for two minutes.
# We send an email message to root to notify him.
#
SYSADMIN=root
APCUPSD_MAIL="no"

HOSTNAME=`hostname`
MSG="slave $HOSTNAME lost contact with master"
#
(
   echo "Subject: $MSG"
   echo " "
   echo "$MSG"
   echo " "
   /sbin/apcaccess status
) | $APCUPSD_MAIL $SYSADMIN
exit 0