# Teamspeak 3 question



## TeenLinux (Jan 18, 2016)

Hello. How do I make TS3 start on reboot?


----------



## AlbaHost (Jan 18, 2016)

TeenLinux said:


> Hello. How do I make TS3 start on reboot?



Go ahead and google you will find alot of tutorials about it. IE http://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/


----------



## HalfEatenPie (Jan 18, 2016)

Add in /etc/rc.local


/opt/ts3/teamspeak3-server_linux-amd64/ts3serverautorestart.sh


Which ts3serverautorestart.sh contains:


#!/bin/bash
nohup /opt/ts3/teamspeak3-server_linux-amd64/ts3server_startscript.sh start


Honestly, you probably could just remove the entire need for a script and just run that one line of code as rc.local.  However, I just kinda felt like doing it that way.


Wow I'm weird


----------



## TeenLinux (Jan 18, 2016)

HalfEatenPie said:


> Add in /etc/rc.local
> 
> 
> 
> ...



So I just run the first command?


----------



## DomainBop (Jan 18, 2016)

HalfEatenPie said:


> Add in /etc/rc.local
> 
> 
> 
> ...



rc.local is deprecated on many distros that use systemd (and/or not enabled by default) so if you want to use it on RHEL7/CentOS7/Arch/etc. you may need to enable the rc-local service first so it will execute the rc.local commands.  If you're using rc.local remember to put "exit 0" after your list of commands in the rc.local file.


My preference is to do what AlbaHost suggested:


crontab -e


and add:


@reboot /opt/ts3/teamspeak3-server_linux-amd64/ts3server_startscript.sh start




If you're using FreeBSD, just add the following to /etc/rc.conf


```
teamspeak_enable="YES"
```


----------



## HalfEatenPie (Jan 18, 2016)

DomainBop said:


> rc.local is deprecated on many distros that use systemd (and/or not enabled by default) so if you want to use it on RHEL7/CentOS7/Arch/etc. you may need to enable the rc-local service first so it will execute the rc.local commands.  If you're using rc.local remember to put "exit 0" after your list of commands in the rc.local file.
> 
> 
> My preference is to do what AlbaHost suggested:
> ...



Good call.  Yeah I should have mentioned I've been lazy and also commonly use Debian.


What @DomainBop said is 100% correct.  Honestly using crontab is doing it "right", rather than placing the command in /etc/rc.local. 



TeenLinux said:


> So I just run the first command?



Read DomainBop's post.  it's probably better.


But basically yes (assuming the script actually is located in that folder).


----------

