summaryrefslogtreecommitdiff
blob: 1fc3d3287ce09eb79601f3249e59e331e1cc9e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd-init,v 1.1 2002/08/04 03:15:52 woodchip Exp $

depend() {
	need net
	before upsmon
}

start() {
	ebegin "Starting upsd"
	/sbin/upsdrvctl start
	start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
		--pidfile=/var/state/nut/upsd.pid
	eend $?
}

stop() {
	ebegin "Stopping upsd"
	start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
	rc=$?
	/sbin/upsdrvctl stop
	eend $rc
}