diff options
Diffstat (limited to 'sys-power/nut/files/nut-2.6.5-init.d-upsmon')
-rw-r--r-- | sys-power/nut/files/nut-2.6.5-init.d-upsmon | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upsmon b/sys-power/nut/files/nut-2.6.5-init.d-upsmon new file mode 100644 index 000000000000..3aafe1676d6e --- /dev/null +++ b/sys-power/nut/files/nut-2.6.5-init.d-upsmon @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +pidfile=/var/run/upsmon.pid +bin=/usr/sbin/upsmon + +depend() { + use net +} + +start() { + ebegin "Starting upsmon" + start-stop-daemon --start --quiet --exec ${bin} + eend $? +} + +stop() { + ebegin "Stopping upsmon" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} +reload() { + ebegin "Reloading upsmon" + start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} + eend $? +} |