summaryrefslogtreecommitdiff
path: root/contrib/epgd.init.d.openrc
blob: d45c51142c4f4bb39f46430bcf5e5d46b31913b5 (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
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

depend() {
	need net
	need mysql
}

start() {
	export LOGFILE
	export LANG="de_DE.UTF-8"
	export PIDFILE
	export CLI_OPTIONS
	export COMMAND="/usr/local/bin/epgd"
	ebegin "Starting epgd"
	start-stop-daemon --start --pidfile ${PIDFILE} -i -u root:root \
		--progress --background --make-pidfile -1 ${LOGFILE} \
		-2 ${LOGFILE} --exec ${COMMAND} --verbose -- ${CLI_OPTIONS}
	eend $?
}

stop() {
	ebegin "Stoping epgd"
	start-stop-daemon --stop --pidfile ${PIDFILE} --progress \
		--retry 30 --exec ${COMMAND} --verbose

	eend $?
}