aboutsummaryrefslogtreecommitdiffstats
path: root/community/svxlink/svxlink.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/svxlink/svxlink.initd')
-rw-r--r--community/svxlink/svxlink.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/community/svxlink/svxlink.initd b/community/svxlink/svxlink.initd
new file mode 100644
index 00000000000..ece921a3d3a
--- /dev/null
+++ b/community/svxlink/svxlink.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+
+name="SvxLink Server"
+pname="svxlink"
+command="/usr/bin/$pname"
+
+
+POPTS="--daemon \
+ ${RUNASUSER:+--runasuser=$RUNASUSER} \
+ ${PIDFILE:+--pidfile=$PIDFILE} \
+ ${LOGFILE:+--logfile=$LOGFILE} \
+ ${CFGFILE:+--config=$CFGFILE}"
+
+depend() {
+ need localmount
+ use net
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting $pname"
+ export $ENV
+ start-stop-daemon --start --pidfile $PIDFILE --exec $command -- $POPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --quiet --pidfile "$PIDFILE"
+ eend $? "Failed to stop $name"
+}
+