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

PIDFILE=/run/${SVCNAME}.pid

depend() {
	need net
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start --quiet --background --make-pidfile \
		--exec /usr/sbin/sercd --chuid ${SERCD_USER} --pidfile "${PIDFILE}" \
		-- ${SERCD_OPTS} -p ${SERCD_PORT} -l ${SERCD_ADDR} \
		${SERCD_LOGLEVEL} "${SERCD_DEVFILE}" "${SERCD_LOCKFILE}" ${SERCD_POLLINTERV}
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --quiet --name sercd --pidfile "${PIDFILE}"
	eend $?
}