You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-radio/svxlink/files/remotetrx.init

43 lines
786 B

#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
PNAME=remotetrx
NAME="RemoteTrx Server"
DAEMON=/usr/bin/$PNAME
POPTS="--daemon \
${RUNASUSER:+--runasuser=$RUNASUSER} \
${PIDFILE:+--pidfile=$PIDFILE} \
${LOGFILE:+--logfile=$LOGFILE} \
${CFGFILE:+--config=$CFGFILE}"
create_logfile()
{
touch $LOGFILE
if [ -n "$RUNASUSER" ]; then
chown $RUNASUSER.$RUNASUSER $LOGFILE
fi
}
depend() {
need localmount
use net
after bootmisc
}
start() {
ebegin "Starting $NAME"
create_logfile
export $ENV
start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- $POPTS
eend $?
}
stop() {
ebegin "Stopping $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON
eend $?
}