summaryrefslogtreecommitdiff
blob: 9ccf173db0287c1df53b88ae5b3fe1f8b7b517bb (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
27
28
29
#!/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/nut-2.2.2-init.d-upsmon,v 1.2 2008/06/25 02:53:08 robbat2 Exp $

opts="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 $?
}