aboutsummaryrefslogtreecommitdiffstats
path: root/audio/teamspeak_server/files/teamspeak-server.in
blob: 0e740a3b801e9b874dbd8073fe87065799b1c225 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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.
#

. %%RC_SUBR%%

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"