blob: fad15e41afc06a476ab83f2a8b5198918ecd640d (
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 Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd.rc6,v 1.7 2004/03/09 03:39:22 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 $?
}
|