blob: ece921a3d3abe512b25c3f5e2fe0a8181a877da2 (
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
31
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"
}
|