Using systemd to start teamspeak

mardi 27 octobre 2015

Just a quick start script for those using systemd, I have tested this and it works, just change the locations to point to your install. The file should placed in the /etc/systemd/system directory, as an example if we used /etc/systemd/system/teamspeak.service we could then do systemctl start teamspeak and systemctl enable teamspeak so that way teamspeak starts if the server reboots.

Code:

[Unit]
Description=Teamspeak Start Script
After=network.target

[Service]
User=teamspeak
WorkingDirectory=/home/teamspeak/teamspeak3-server_linux-amd64
Type=forking
ExecStart=/home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh start
ExecStop=/home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh stop
ExecReload=/home/teamspeak/teamspeak3-server_linux-amd64/ts3server_startscript.sh restart
PIDFile=/home/teamspeak/teamspeak3-server_linux-amd64/ts3server.pid
Restart=always

[Install]
WantedBy=multi-user.target

Using systemd to start teamspeak

0 commentaires:

Enregistrer un commentaire