diff options
Diffstat (limited to 'sys-power/nut/files/upsd.rc6')
-rwxr-xr-x | sys-power/nut/files/upsd.rc6 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-power/nut/files/upsd.rc6 b/sys-power/nut/files/upsd.rc6 new file mode 100755 index 000000000000..ebe6414b06e7 --- /dev/null +++ b/sys-power/nut/files/upsd.rc6 @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/upsd.rc6,v 1.1 2006/05/15 23:43:08 robbat2 Exp $ + +depend() { + need net upsdrv + before upsmon +} + +start() { + ebegin "Starting upsd" + # clean up first + pkill -u root -x upsd + sleep 1s + rm -f /var/state/nut/upsd.pid + # now start up + start-stop-daemon --start --quiet --exec /usr/sbin/upsd + eend $? +} + +stop() { + ebegin "Stopping upsd" + start-stop-daemon --stop --quiet --pidfile /var/lib/nut/upsd.pid + eend $? +} |