1d6b4b3f91
s#. %%RC_SUBR%%#. /etc/rc.subr#
38 lines
681 B
Bash
38 lines
681 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: teamspeak
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# teamspeak_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable teamspeak.
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
# Set some defaults
|
|
teamspeak_user=${teamspeak_user:-"teamspeak"}
|
|
|
|
name=teamspeak
|
|
rcvar=${name}_enable
|
|
|
|
command="%%PREFIX%%/lib/teamspeak_server/server_linux"
|
|
command_args=">/dev/null"
|
|
pidfile="%%PREFIX%%/lib/teamspeak_server/server.pid"
|
|
stop_postcmd="teamspeak_poststop"
|
|
|
|
teamspeak_poststop()
|
|
{
|
|
/bin/rm -f "${pidfile}"
|
|
}
|
|
|
|
load_rc_config $name
|
|
|
|
: ${teamspeak_enable="NO"}
|
|
|
|
run_rc_command "$1"
|