You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-power/apcupsd/files/apcupsd.powerfail.init

18 lines
397 B

#!/sbin/openrc-run
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description='Signal the UPS to kill power in a power failure condition'
depend() {
need mount-ro
}
start() {
if [ "$(runlevel | cut -d' ' -f2)" = "0" -a -f /etc/apcupsd/powerfail ] ; then
ebegin 'Signaling UPS to kill power'
/sbin/apcupsd --killpower
eend $?
fi
}