Added a fork of the NUT Package
* Forked of the community repo version to enable CGI components
This commit is contained in:
17
nut/powerfail.initd
Normal file
17
nut/powerfail.initd
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/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 [ "$RC_RUNLEVEL" = "shutdown" -a -f /etc/killpower ] ; then
|
||||
ebegin 'Signaling UPS to kill power'
|
||||
/usr/sbin/upsdrvctl shutdown
|
||||
eend $?
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user