Added some system scripts for Gentoo.

git-svn-id: svn://svn.code.sf.net/p/svxlink/svn/trunk@1440 f8843c6b-282e-0410-804b-c0d5895947d2
This commit is contained in:
Tobias Blomberg 2008-10-05 07:01:18 +00:00
parent a90c03ee03
commit f0dd91eca9
5 changed files with 143 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#############################################################################
#
# Configuration file for the RemoteTrx startup script /etc/init.d/remotetrx
#
#############################################################################
# The log file to use
LOGFILE=/var/log/remotetrx
# The PID file to use
PIDFILE=/var/run/remotetrx.pid
# The user to run the SvxLink server as
RUNASUSER=svxlink
# Specify which configuration file to use
CFGFILE=/etc/remotetrx.conf
# Environment variables to set up. Separate variables with a space.
ENV="ASYNC_AUDIO_NOTRIGGER=1"

View File

@ -0,0 +1,21 @@
#############################################################################
#
# Configuration file for the SvxLink startup script /etc/init.d/svxlink
#
#############################################################################
# The log file to use
LOGFILE=/var/log/svxlink
# The PID file to use
PIDFILE=/var/run/svxlink.pid
# The user to run the SvxLink server as
RUNASUSER=svxlink
# Specify which configuration file to use
CFGFILE=/etc/svxlink.conf
# Environment variables to set up. Separate variables with a space.
ENV="ASYNC_AUDIO_NOTRIGGER=1"

View File

@ -0,0 +1,45 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
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() {
#}
#restart() {
#}

View File

@ -0,0 +1,45 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
PNAME=svxlink
NAME="SvxLink 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() {
#}
#restart() {
#}

View File

@ -0,0 +1,11 @@
/var/log/svxlink /var/log/remotetrx {
missingok
notifempty
weekly
create 0644 svxlink svxlink
postrotate
killall -HUP svxlink
killall -HUP remotetrx
endscript
}