UPS: apcupsd support with gui
[tomato.git] / release / src / router / apcupsd / platforms / debian / ups-monitor
blob08756083723578d86695a1ba75dbdee4ebec468d
1 #!/bin/sh
2 # apcupsd halt script
3 # by Martin Mitchell <martin@debian.org>
4 # modifications by Gordon Morehouse <spambox@evernex.com> April 2001
6 case "$1" in
7 poweroff | killpower)
8 if [ -f /usr/local/apcupsd/powerfail ]; then
9 echo ""
10 echo -n "apcupsd: Ordering UPS to kill power... "
11 /usr/local/apcupsd/apccontrol killpower
12 echo "done."
13 echo ""
14 echo "Please ensure the UPS has powered off before rebooting."
15 echo "Otherwise, the UPS may cut the power during the reboot!"
16 echo ""
17 sleep 2d
23 esac
25 exit 0