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/nut/files/nut-2.2.2-init.d-upsmon

31 lines
563 B

#!/sbin/openrc-run
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
extra_started_commands="reload"
pidfile=/var/run/upsmon.pid
bin=/usr/sbin/upsmon
depend() {
need 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 upsd"
start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile}
eend $?
}