summaryrefslogtreecommitdiff
path: root/net-dialup/sercd/files/sercd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/sercd/files/sercd.initd')
-rw-r--r--net-dialup/sercd/files/sercd.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/net-dialup/sercd/files/sercd.initd b/net-dialup/sercd/files/sercd.initd
new file mode 100644
index 000000000000..3022a01f1ad6
--- /dev/null
+++ b/net-dialup/sercd/files/sercd.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 $?
+}