thepeople aeffe82d7f fix changeme script, from #6828
git-svn-id: svn://svn.openwrt.org/openwrt/packages@20193 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-03-14 03:37:42 +00:00

18 lines
414 B
Bash

#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when apcupsd
# detects that the battery should be replaced.
# We send an email message to root to notify him.
#
. /etc/apcupsd/apcupsd_mail.conf
MSG="$HOSTNAME UPS battery needs changing NOW."
#
(
echo "$MSG"
echo " "
/usr/sbin/apcaccess status
) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
exit 0