Skip to content

Instantly share code, notes, and snippets.

@banasiak
Created November 16, 2013 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save banasiak/7505239 to your computer and use it in GitHub Desktop.
Save banasiak/7505239 to your computer and use it in GitHub Desktop.
TS3 Upstart Script
#
# TeamSpeak 3 Server settings
# /etc/default/teamspeak
#
# TS3 install path
TS3_PATH="/opt/teamspeak"
# TS3 binary
TS3_BIN="ts3server_linux_amd64"
# user to run TS3 server as
TS3_USER="teamspeak"
# parameters to pass to TS3 startup script
TS3_PARAMS="inifile=${TS3_PATH}/ts3server.ini disable_db_logging=0"
#
# teamspeak - TeamSpeak 3 Server Upstart Job
# /etc/init/teamspeak.conf
#
description "TeamSpeak 3 Server"
author "Richard Banasiak <richard@banasiak.com>"
start on (filesystem and net-device-up IFACE!=lo and mysql)
stop on runlevel [!2345]
respawn
kill timeout 10
script
#exec 2>/tmp/ts3.debug
#set -x
. /etc/default/teamspeak
[ -z "${TS3_BIN}" ] && exit 1
cd "${TS3_PATH}"
export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
exec /usr/bin/sudo -u ${TS3_USER} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" "${TS3_PATH}/${TS3_BIN}" ${TS3_PARAMS}
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment