blob: 9eafd474e0fc414946d3e4f2b2d51d8f64825ebe (
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
26
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd.rc6,v 1.8 2004/07/15 00:06:11 agriffis 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 $?
}
|