Created
April 26, 2020 00:17
-
-
Save sindastra/52237f1fc9969cd12689cd8a943fedd9 to your computer and use it in GitHub Desktop.
TeamSpeak3 systemd service file tested with TeamSpeak version 3.12.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=TeamSpeak3 Server | |
Wants=network-online.target | |
After=syslog.target network.target local-fs.target | |
[Service] | |
WorkingDirectory=/home/ts3server/teamspeak3-server_linux_amd64 | |
User=ts3server | |
Group=ts3server | |
Type=forking | |
ExecStart=/home/ts3server/teamspeak3-server_linux_amd64/ts3server_startscript.sh start license_accepted=1 | |
ExecStop=/home/ts3server/teamspeak3-server_linux_amd64/ts3server_startscript.sh stop | |
PIDFile=/home/ts3server/teamspeak3-server_linux_amd64/ts3server.pid | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Isn't Type=simple
better solution? This way systemd monitors the process and you also get the stdout output from the teamspeak server in the journalctl output.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create the file
/etc/systemd/system/teamspeak.service
with the above as its content.Then to set up the server do something like (tested on Ubuntu 18.04 server):
If all goes well and it starts without issues, you can enable it to start automatically with:
To get the latest TeamSpeak 3 server or to upgrade the current installation get it from https://teamspeak.com/en/downloads/#server
Then cd to
/home/ts3server
, wget the latest .tar.bz2, untar it and restart the service withsystemctl restart teamspeak