#!/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