amuck-landowner

Teamspeak 3 question

HalfEatenPie

The Irrational One
Retired Staff
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

New Member
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 

So I just run the first command?
 

DomainBop

Dormant VPSB Pathogen
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 

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

Code:
teamspeak_enable="YES"
 
Last edited by a moderator:

HalfEatenPie

The Irrational One
Retired Staff
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"

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. 

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). 
 
Last edited by a moderator:
Top
amuck-landowner