mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
apcupsd: preset shutdown binary
Signed-off-by: Othmar Truniger <github@truniger.ch>
This commit is contained in:
committed by
Rosen Penev
parent
dd2c1e03e6
commit
9104a1f140
@@ -20,7 +20,7 @@ exec_prefix=/usr
|
||||
|
||||
APCPID=/var/run/apcupsd.pid
|
||||
APCUPSD=/usr/sbin/apcupsd
|
||||
SHUTDOWN=/sbin/shutdown
|
||||
SHUTDOWN=/sbin/halt
|
||||
SCRIPTSHELL=/bin/sh
|
||||
SCRIPTDIR=/etc/apcupsd
|
||||
WALL=true
|
||||
@@ -101,11 +101,11 @@ case "$1" in
|
||||
;;
|
||||
doreboot)
|
||||
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
|
||||
${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
|
||||
echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
|
||||
;;
|
||||
doshutdown)
|
||||
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
|
||||
${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
|
||||
echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
|
||||
;;
|
||||
annoyme)
|
||||
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
|
||||
|
||||
Reference in New Issue
Block a user