• Be part of the TeaParty!
    Click here for more information

TeaSpeak Autostart-Script

#1
I was inspired by this guide and I tested it on AWS EC2 and it works!

(SOURCE: https://www.howtoforge.com/tutorial...rver-on-centos-7/#configuring-systemd-service)



TeaSpeak server can be easily managed using the commands above, it is recommended to setup a systemd service unit so that you can start and manage the server using the service. This will also ensure that the service is automatically started at boot time.

Create a new systemd service file by running the following command.

nano /lib/systemd/system/teaspeak.service

Populate the file with the following content.

Code:
[Unit]
Description=TeaSpeak Server Service
After=network.target

[Service]
Type=forking
WorkingDirectory=/home/teaspeak/
ExecStart=/home/teaspeak/teastart.sh start
ExecStop=/home/teaspeak/teastart.sh stop
User=teaspeak
Group=teaspeak
PIDFile=/home/teaspeak/tpid.pid
Restart=always
RestartSec=9
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=teaspeak

[Install]
WantedBy=multi-user.target


Save the file and exit from the editor. Now you can start TeamSpeak using:

systemctl start teaspeak

To configure TeamSpeak to automatically start at boot time, use.

systemctl enable teaspeak

To check if TeamSpeak service is started correctly, you can run the following command to check the status of the TeamSpeak service.

systemctl status teaspeak
 

Sparky

Active member
#3
it's good but by that why we miss the "live logs" wich can some times help us (I mean this part ./teastart_autorestart.sh attach)
but otherwith great job :D