• Hey Guest, we're evolving the future of TeaSpeak.
    You're invited to join the discussion here!

[SETUP][Linux] TeaSpeak Autostart-Script

h00n1g4n

Member
This is an autorestart script for TeaSpeak so you do not have to run it manually each time you restart your system.



1.
Create a file called "teaspeak" with your preferred editor (VI, VIM, NANO,...), I am going to use VIM in this case.
apt-get install vim
vim /etc/init.d/teaspeak


2.
Paste the following content into the file you are just creating:

Code:
!/bin/sh
### BEGIN THE INIT INFO
# teaspeak
# $local_fs $network
# TeaSpeak Server
### END THE INIT INFO
# Change the values below for your needs compatible to your system: "USER"; "DIR"
USER="teaspeak"
DIR="/usr/local/teaspeak/TeaSpeakServer"
###### TeaSpeak Server start/stop script

case "$1" in
start)
su $USER -c "${DIR}/teastart.sh start"
;;
stop)
su $USER -c "${DIR}/teastart.sh stop"
;;
restart)
su $USER -c "${DIR}/teastart.sh restart"
;;
status)
su $USER -c "${DIR}/teastart.sh status"
;;
*)
echo "Usage: {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
or download the attached file and extract it.


3.
Make the file executable by using
chmod 755 /etc/init.d/teaspeak


4.
Define the autostart with
update-rc.d teaspeak defaults


________________________________________________

I have not tested it yet but it should work like that.
Do not forget to adjust it for your needs.


PS:
VirusTotal-Output
 

Attachments

Last edited: