farhadhelix
TeaFanatic
Hello
this is a little script that will make your TeaSpeak server to autostart itself on startup and on server crashes
with this tutorial you can assure your Teaspeak server is always running even after crashes
first go to your /home
then make a file named tsanticrash.sh
then an empty screen will be opened .then paste the codes below into it(simply copy code here and paste them into that empty screen by just RIGHT CLICK on putty )
Important Note : change the "/home/teaspeak/" to the exact installation folder
then pres combinations of these two buttons on your keyboard (CTRL+X) then Press type y and then press ENTER to save and exit
then run this command below to grant permission to the file you just created
then you have to create a cronjob for this script to check it every 1 minutes
you will then enter into your system cronjobs area
go the the last line of it and enter code below(simply copy code here and paste them into that empty screen by just RIGHT CLICK on putty )
then again (CTRL+X) then Press type y and then press ENTER to save and exit
your all done. every 1 minute it will check if there is teaspeakserver running or not and if there is no server it will start it itself
this is a little script that will make your TeaSpeak server to autostart itself on startup and on server crashes
with this tutorial you can assure your Teaspeak server is always running even after crashes
first go to your /home
Code:
cd /home
Code:
nano tsanticrash.sh
Code:
#!/bin/bash
case $1 in
teaspeakserver)
teaspeakserverpid=`ps ax | grep TeaSpeakServer | grep -v grep | wc -l`
if [ $teaspeakserverpid -eq 1 ]
then exit
else cd /home/teaspeak/
./teastart.sh start
fi
;;
esac
Important Note : change the "/home/teaspeak/" to the exact installation folder
then pres combinations of these two buttons on your keyboard (CTRL+X) then Press type y and then press ENTER to save and exit
then run this command below to grant permission to the file you just created
Code:
chmod 777 tsanticrash.sh
Code:
crontab -e
go the the last line of it and enter code below(simply copy code here and paste them into that empty screen by just RIGHT CLICK on putty )
Code:
*/1 * * * * /home/tsanticrash.sh teaspeakserver
your all done. every 1 minute it will check if there is teaspeakserver running or not and if there is no server it will start it itself
Last edited: