summaryrefslogtreecommitdiff
blob: 3e5d9b3bf7e7a202cc160e3f0bbfa49c2ff63587 (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
30
31
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut-2.6.5-init.d-upslog,v 1.1 2013/08/12 18:35:12 robbat2 Exp $

extra_started_commands="reload"

pidfile=/var/run/upslog.pid
bin=/usr/bin/upslog

depend() {
	use upsdrv
	after upsdrv
}

start() {
	ebegin "Starting upslog"
	start-stop-daemon --start --quiet --exec ${bin}
	eend $?
}

stop() {
	ebegin "Stopping upslog"
	start-stop-daemon --stop --quiet --pidfile ${pidfile}
	eend $?
}
reload() {
	ebegin "Reloading upslog"
	start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile}
	eend $?
}