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

Server [Auto] Update script

dension

Well-known member
Premium User
Cron usage for user who do not use screen -x:

Login (no as su)
Command: crontab -e
Select (if you did not create cron) example: 1 (create new crontab with nano)
In the last row copy paste or type during three rows (Rewrite USER_NAME and TEASPEAKSERVERFOLDERNAME):
@reboot /home/USER_NAME/TEASPEAKSERVERFOLDERNAME/teastart.sh start
0 5 * * * /home/USER_NAME/TEASPEAKSERVERFOLDERNAME/teaspeak_updater.sh -f -s
0 4 * * * tar -zcf /home/USER_NAME/DAILYBACKUPFOLDERNAME/TeaSpeakServerBackup_`date +\%Y\%m\%d\%H\%M\%S`.tgz /home/USER_NAME/TEASPEAKSERVERFOLDERNAME/

What cron taks will do:
First line: start TeaSpeak server when server computer startup
Second line: Run autoupdate script every day at 05:00
Third line: Make backup file every day at 04:00 in next file name format: TeaSpeakServerBackup_20180820040532.tgz

Note: Files of TeaSpeak server and backup script must be in their unique folder. You have to create unique backup folder.
 
Last edited:

Tincho

Active member
0 5 * * * /home/USER_NAME/TEASPEAKSERVERFOLDERNAME/teaspeak_updater.sh -f -s

In my case, today TeaSpeak was restarted and there isn't any new update. Server wasn't rebooted.
 

mkll11one

TeaSpeak Team
Staff member
TeaTeam
0 5 * * * /home/USER_NAME/TEASPEAKSERVERFOLDERNAME/teaspeak_updater.sh -f -s

In my case, today TeaSpeak was restarted and there isn't any new update. Server wasn't rebooted.
It don't restart, if there isn't any new updates! :) so you need to start the server manually. ;)
 

dension

Well-known member
Premium User
Sure! Thanks anyway :)
It is working for me.
The switches:
-f: forced and silent update without question;
-s after update start again server.
Also if update script find update and install it first stop the server, after install update after finally start the server.
If update script do not find update, the update script will do nothing.

The update script (teaspeak_updater.sh) must to be in that folder where are the files of TeaSpeak server.

But I do not know what will happen if you use screen x, i did not try it.
 
Last edited:

Tincho

Active member
Thanks for your answer. My cron is 0 5 * * * /home/ts3srv/teaupdate.sh -f -s

And today was restarted with no changes. Maybe I'm doing something wrong.
 

mkll11one

TeaSpeak Team
Staff member
TeaTeam
Thanks for your answer. My cron is 0 5 * * * /home/ts3srv/teaupdate.sh -f -s

And today was restarted with no changes. Maybe I'm doing something wrong.
Maybe because you did updated yesterday? ;) there is no new update today.
 

Tincho

Active member
I'll check that Nicer. Maybe this will work.

Code:
chown -R username ~username
chgrp -R $(id -gn username) ~username
 

mkll11one

TeaSpeak Team
Staff member
TeaTeam
@mkll11one If I asked you to set up the Tea*Speak on my VPS, would you do it? Please, I can not find the way to put it online, I always get an error or it does not start me for 3.2.1 please
Normally it will helps. if you do this:

Open protocol_key.txt > copy all text > exit the file > delete it > create a new file called: protocol_key.txt > and insert the text again & it should works.

You are free to send me PM, if you can't get it works! ;) i have helped 4-5 guys now...(i think... or was it 4) :)
 

szkuta

Well-known member
i do not use -s variable and server still updates fine if there is an update available
i just use the script with crontab and -f parameter
if there is an update server will be updated and rebootet automatically fine

is my usage correct?

there are no problems for me. was just wondering about the -s parameter. script restarts server without -s parameter too at my server.

sorry for horrible english^^