aboutsummaryrefslogtreecommitdiffstats
path: root/audio/teamspeak_server/files/teamspeak-server.in
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2006-04-15 02:10:37 +0800
committermnag <mnag@FreeBSD.org>2006-04-15 02:10:37 +0800
commit1ac2d8d3932ecbd4d5abc22844faad2301946ba4 (patch)
tree515d50300df36080a91de3f5b280c1d2156438d8 /audio/teamspeak_server/files/teamspeak-server.in
parent2a98f1bd679cb8431a4b62445bf02f966747077f (diff)
downloadfreebsd-ports-gnome-1ac2d8d3932ecbd4d5abc22844faad2301946ba4.tar.gz
freebsd-ports-gnome-1ac2d8d3932ecbd4d5abc22844faad2301946ba4.tar.zst
freebsd-ports-gnome-1ac2d8d3932ecbd4d5abc22844faad2301946ba4.zip
- Use new style rc.d script.
- Reorganize Makefile - Bump PORTREVISION PR: 95063 Submitted by: "Anish Mistry" <amistry___am-productions.biz> Approved by: maintainer
Diffstat (limited to 'audio/teamspeak_server/files/teamspeak-server.in')
-rw-r--r--audio/teamspeak_server/files/teamspeak-server.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/audio/teamspeak_server/files/teamspeak-server.in b/audio/teamspeak_server/files/teamspeak-server.in
new file mode 100644
index 000000000000..eae1f09842a0
--- /dev/null
+++ b/audio/teamspeak_server/files/teamspeak-server.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: teamspeak
+# REQUIRE: NETWORKING
+# 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"