summaryrefslogtreecommitdiff
blob: 438d3dcc45018b5292d833a5edaa2b0bfa48e3b3 (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
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need net
}

start() {
	# create piddir if necessary, bug #448498
	local piddir=$(dirname ${ERR_PID_FILE})
	checkpath -q -d -o err:err -m 0770 "${piddir}" || {
                eend 1
                return 1
        }

	ebegin "Starting errd"
		start-stop-daemon --start --make-pidfile --pidfile ${ERR_PID_FILE} --background --quiet -u ${ERR_USER}:${ERR_GROUP} \
			--exec /usr/bin/python2 -- /usr/bin/err.py -c ${ERR_CONFIG_PATH}
	eend $?
}

stop() {
	ebegin "Stopping errd"
		start-stop-daemon --stop --pidfile ${ERR_PID_FILE}
	eend $?
}