mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
9eedc760df
Updates to not install as root, and installs startup script as .sample. PR: ports/56918 Submitted by: Daniel O'Connor <darius@dons.net.au>
30 lines
414 B
Bash
30 lines
414 B
Bash
#!/bin/sh
|
|
#
|
|
# Start/stop the TeamSpeak 2 server
|
|
#
|
|
|
|
TSHOME=%%TSHOME%%
|
|
PIDFILE=${TSHOME}/server.pid
|
|
|
|
cd "$TSHOME"
|
|
|
|
case "$1" in
|
|
start)
|
|
su -fm teamspeak -c './server_linux >/dev/null' && echo -n ' teamspeak_server'
|
|
;;
|
|
stop)
|
|
kill -TERM `cat "$PIDFILE"`
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
echo 5 second pause before restart. . .
|
|
sleep 5
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
exit 0
|
|
|