UPS: apcupsd support with gui
[tomato.git] / release / src / router / apcupsd / platforms / etc / offbattery.in
blob6c0e9463cf9271364e9840868c21da50d3cafbb3
1 #!/bin/sh
3 # This shell script if placed in /etc/apcupsd
4 # will be called by /etc/apcupsd/apccontrol when the
5 # UPS goes back on to the mains after a power failure.
6 # We send an email message to root to notify him.
8 source /etc/apcemail.conf
10 HOSTNAME=`hostname`
11 MSG="$HOSTNAME Power has returned"
14 echo "Subject: $MSG"
15 echo
16 echo "$MSG"
17 echo
18 @sbindir@/apcaccess status
19 ) | $APCUPSD_MAIL $SYSADMIN
20 exit 0