Skip to main content

TeamSpeak 3 server update script

· One min read

This is the short TeamSpeak 3 server update script that I use on the blog server. The script takes one parameter, which is the url of the release archive. It downloads the archive, extracts it and copies the files into the directory of the running server.

Two steps are needed around the script. The server service has to be stopped first, and it has to be started again after the script finished. The copy command writes into ts3/, which is the folder that holds the actual server files. Adjust that path for your layout.

#!/bin/sh
if [ $# -eq 0 ]
then
echo "Add url parameter to download"
exit
fi
mkdir ts3_dl
wget $1 -P ts3_dl
tar -xjf ts3_dl/teamspeak3*.tar.bz2 -C ts3_dl
cp -r ts3_dl/teamspeak3*/* ts3/
rm -r ts3_dl

Run it like this, and give the archive url as the only argument:

./ts3-update.sh <archive-url>