freebsd-ports/audio/ventrilo-server/files/ventrilo-server.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

44 lines
804 B
Bash

#!/bin/sh
# $FreeBSD$
# PROVIDE: ventrilo
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name=ventrilo
rcvar=ventrilo_enable
homedir="%%PREFIX%%/ventrilo-server"
pidfile="${homedir}/ventrilo_srv.pid"
ventrilo_user=${name}
command="${homedir}/ventrilo_srv"
command_args="'-f${homedir}/ventrilo_srv' -d >/dev/null"
extra_commands="info"
info_cmd="ventrilo_info"
load_rc_config $name
: ${ventrilo_enable="NO"}
: ${ventrilo_port="3784"}
: ${ventrilo_srv="localhost"}
ventrilo_info()
{
if [ "$1" != "" ]; then
ventrilo_srv="$1"
fi
if [ "$2" != "" ]; then
ventrilo_port="$2"
fi
echo -n "Password []: "
oldttymodes=`stty -g`
stty -echo
read ventrilo_passwd
stty $oldttymodes
${homedir}/ventrilo_status -c2 "-t${ventrilo_srv}:${ventrilo_port}:${ventrilo_passwd}"
}
run_rc_command $*