rc.local Teamspeak autostart

1

1

I would like to auto start Teamspeak server in case of a machine restart, to do that I made this entry into the /etc/rc.local:

/bin/sh /home/derv__2014532/voice/teamspeak/ts3server_startscript.sh restart

Basically it works and the command is being run, however Teamspeak server is closing immadiately telling telnet connection closed. If I manually start using the same command, it works just fine.

Entire rc.local file content:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Teamspeak boot
/bin/sh /home/derv__2014532/voice/teamspeak/ts3server_startscript.sh restart

exit 0

Is there any reason that rc.local might not work in this case?

RA.

Posted 2016-10-23T01:29:53.390

Reputation: 111

Answers

0

You can install teamspeak 3.0.13.5 from the ports system. You will find it in /usr/ports/audio/teamspeak3-server/.

Note that teamspeak 3 does not run on FreeBSD 9 nor FreeBSD 11 at this time, according to the port makefile.

This port comes with a startup script that will be installed in /usr/local/etc/rc.d/. (you will find it's template in /usr/ports/audio/teamspeak3-server/files/teamspeak.in.) Just put teamspeak_enable="YES" in /etc/rc.conf or /etc/rc.conf.local. Then you can run service teamspeak start to start it by hand, and it will be automatically restarted after a reboot.

Roland Smith

Posted 2016-10-23T01:29:53.390

Reputation: 1 712