|
@ -20,7 +20,7 @@ exec_prefix=/usr |
|
|
|
|
|
|
|
|
APCPID=/var/run/apcupsd.pid |
|
|
APCPID=/var/run/apcupsd.pid |
|
|
APCUPSD=/usr/sbin/apcupsd |
|
|
APCUPSD=/usr/sbin/apcupsd |
|
|
SHUTDOWN=/sbin/shutdown |
|
|
|
|
|
|
|
|
SHUTDOWN=/sbin/halt |
|
|
SCRIPTSHELL=/bin/sh |
|
|
SCRIPTSHELL=/bin/sh |
|
|
SCRIPTDIR=/etc/apcupsd |
|
|
SCRIPTDIR=/etc/apcupsd |
|
|
WALL=true |
|
|
WALL=true |
|
@ -101,11 +101,11 @@ case "$1" in |
|
|
;; |
|
|
;; |
|
|
doreboot) |
|
|
doreboot) |
|
|
echo "UPS ${2} initiating Reboot Sequence" | ${WALL} |
|
|
echo "UPS ${2} initiating Reboot Sequence" | ${WALL} |
|
|
${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" |
|
|
|
|
|
|
|
|
echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot |
|
|
;; |
|
|
;; |
|
|
doshutdown) |
|
|
doshutdown) |
|
|
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} |
|
|
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} |
|
|
${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" |
|
|
|
|
|
|
|
|
echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt |
|
|
;; |
|
|
;; |
|
|
annoyme) |
|
|
annoyme) |
|
|
echo "Power problems with UPS ${2}. Please logoff." | ${WALL} |
|
|
echo "Power problems with UPS ${2}. Please logoff." | ${WALL} |
|
|