1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00
freebsd-ports/comms/qtel/files/remotetrx.in
Michael Scheidell ad4d885f34 Addport: ports/comms: Repeater controller and EchoLink (simplex or repeater) software
including a GUI, Qtel - The Qt EchoLink client, written using the Qt widget toolkit.

WWW: http://sourceforge.net/apps/trac/svxlink

PR:		ports/168452
Submitted by:	Stephen Hurd <shurd@sasktel.net> (maintainer)
2012-06-25 15:34:23 +00:00

66 lines
1.5 KiB
Bash

#!/bin/sh
#
# remotetrx This shell script takes care of starting and stopping
# remotetrx (The SvxLink remote transceiver daemon).
#
# PROVIDE: remotetrx
# REQUIRE: NETWORKING DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable remotetrx:
#
# remotetrx_enable="YES"
# # optional
# remotetrx_flags=
#
# description: The SvxLink server is a multi purpose voice services system. \
# It is targeted at ham radio use. Connect the sound card to a radio \
# transceiver and load the modules you need. Enjoy...
# Source function library.
. /etc/rc.subr
name=remotetrx
rcvar=`set_rcvar`
#start_remotetrx=start_remotetrx
#stop_remotetrx=stop_remotetrx
start_cmd=${name}_start
stop_cmd=${name}_stop
remotetrx_enable=${remotetrx_enable:-"NO"}
remotetrx_flags=${remotetrx_flags:-""}
remotetrx_user=${svxlink_user:-"svxlink"}
remotetrx_group=${svxlink_group:-"svxlink"}
remotetrx_conf=${svxlink_conf:="%%PREFIX%%/etc/svxlink/remotetrx.conf"}
remotetrx_logfile=${remotetrx_logfile:="/var/log/remotetrx"}
remotetrx_pidfile=${remotetrx_pidfile:="/var/run/remotetrx.pid"}
#[--help] [--daemon] [--logfile=log file] [--config=configura-
# tion file] [--pidfile=pid file] [--runasuser=user name]
start_remotetrx()
{
if ! checkyesno remotetrx_enable; then
return;
fi
%%PREFIX%%/bin/$name --daemon --config=${remotetrx_conf} \
--pidfile=${remotetrx_pidfile} --runasuser=${svxlink_user}
}
stop_remotetrx()
{
if ! checkyesno remotetrx_enable; then
return;
fi
/bin/kill $(/bin/cat "${pidfile_remotetrx}")
}
run_rc_command "$1"