Teamspeak3

[HowTo] Start services (Teamspeak3)/Scripts after reboot

On systems with rc.local you can execute very easily different scripts and commands right after rebooting your machine by putting the command into „/etc/rc.d/rc.local

I will give you an example for the popular teamspeak3 software and how u dont need anymore take care about it to start it by your self everytime if the machine needs to reboot.

At first you have to set the right premissions to the file of rc.local, that it is executed in case of a reboot:
chmod u+x /etc/rc.d/rc.local

You are now able to write some commands into „/etc/rc.d/rc.local“, by editing with vi or nano:
nano /etc/rc.d/rc.local

For our example to start the Teamspeak3 server, we have to write the following command into the rc.local file:
su - teamspeak3 -c "yes | /opt/teamspeak3-server/private/ts3server_startscript.sh restart"

At first we want to execute the ts3server_startscript.sh with our teamspeak3-user, this is in this case „teamspeak3“, the executed-command is contained between the apostrophes.

yes | /opt/teamspeak3-server/private/ts3server_startscript.sh restart