9aac569eaa
Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op
44 lines
804 B
Bash
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 $*
|