96130cd2a7
WWW: http://www.baycom.org/~tom/ham/soundmodem/ - Diane Bruce, VA3DB db@db.net PR: ports/106823 Submitted by: Diane Bruce <db@db.net>
37 lines
635 B
Bash
37 lines
635 B
Bash
#! /bin/sh
|
|
#
|
|
# PROVIDE: soundmodem
|
|
# REQUIRE: LOGIN
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable soundmodem:
|
|
#
|
|
#soundmodem_enable="YES"
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=soundmodem
|
|
rcvar=`set_rcvar`
|
|
load_rc_config $name
|
|
soundmodem_enable=${soundmodem_enable-"NO"}
|
|
|
|
command=/usr/local/sbin/soundmodem
|
|
start_cmd=soundmodem_start
|
|
stop_cmd=soundmodem_stop
|
|
|
|
pidfile=/var/run/soundmodem.pid
|
|
required_files=/usr/local/etc/soundmodem.conf
|
|
|
|
soundmodem_start()
|
|
{
|
|
echo "Starting Soundmodem: "
|
|
/usr/local/sbin/soundmodem --daemonize
|
|
return 0
|
|
}
|
|
soundmodem_stop()
|
|
{
|
|
echo "Stopping Soundmodem: "
|
|
killall soundmodem
|
|
return 0
|
|
}
|
|
|
|
run_rc_command "$1"
|