[GH-ISSUE #694] TS3 server not updating to 3.0.12.1 #557

Closed
opened 2026-02-27 02:02:18 +03:00 by kerem · 7 comments
Owner

Originally created by @oalaro on GitHub (Feb 12, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/694

ts3server@9752:~$ ./ts3server update-functions
    fetching functions/update_functions.sh...OK
[ .... ] Updating functions
removed `/home/ts3server/functions/check.sh'
removed `/home/ts3server/functions/check_logs.sh'
removed `/home/ts3server/functions/check_root.sh'
removed `/home/ts3server/functions/check_systemdir.sh'
removed `/home/ts3server/functions/core_functions.sh'
removed `/home/ts3server/functions/core_getopt.sh'
removed `/home/ts3server/functions/core_messages.sh'
removed `/home/ts3server/functions/info_distro.sh'
removed `/home/ts3server/functions/update_check.sh'
removed `/home/ts3server/functions/update_functions.sh'
[  OK  ] Updating functions
ts3server@9752:~$ ./ts3server update
    fetching functions/core_functions.sh...OK
    fetching functions/core_messages.sh...OK
    fetching functions/core_getopt.sh...OK
    fetching functions/update_check.sh...OK
    fetching functions/check.sh...OK
    fetching functions/check_root.sh...OK
    fetching functions/check_systemdir.sh...OK
    fetching functions/check_logs.sh...OK
[ .... ] Update ts3-server: Checking for update: teamspeak.com    fetching functions/info_distro.sh...OK
[  OK  ] Update ts3-server: Checking for update: teamspeak.com

No update available:
        Current version: 3.0.12
        Available version: 3.0.12

Originally created by @oalaro on GitHub (Feb 12, 2016). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/694 ``` ts3server@9752:~$ ./ts3server update-functions fetching functions/update_functions.sh...OK [ .... ] Updating functions removed `/home/ts3server/functions/check.sh' removed `/home/ts3server/functions/check_logs.sh' removed `/home/ts3server/functions/check_root.sh' removed `/home/ts3server/functions/check_systemdir.sh' removed `/home/ts3server/functions/core_functions.sh' removed `/home/ts3server/functions/core_getopt.sh' removed `/home/ts3server/functions/core_messages.sh' removed `/home/ts3server/functions/info_distro.sh' removed `/home/ts3server/functions/update_check.sh' removed `/home/ts3server/functions/update_functions.sh' [ OK ] Updating functions ts3server@9752:~$ ./ts3server update fetching functions/core_functions.sh...OK fetching functions/core_messages.sh...OK fetching functions/core_getopt.sh...OK fetching functions/update_check.sh...OK fetching functions/check.sh...OK fetching functions/check_root.sh...OK fetching functions/check_systemdir.sh...OK fetching functions/check_logs.sh...OK [ .... ] Update ts3-server: Checking for update: teamspeak.com fetching functions/info_distro.sh...OK [ OK ] Update ts3-server: Checking for update: teamspeak.com No update available: Current version: 3.0.12 Available version: 3.0.12 ```
kerem 2026-02-27 02:02:18 +03:00
  • closed this issue
  • added the
    type: bug
    label
Author
Owner

@oalaro commented on GitHub (Feb 12, 2016):

I was thinking. Since teamspeak has horrible naming scheme, can we have a update function where we set the server version number variable manually.

<!-- gh-comment-id:183225423 --> @oalaro commented on GitHub (Feb 12, 2016): I was thinking. Since teamspeak has horrible naming scheme, can we have a update function where we set the server version number variable manually.
Author
Owner

@UltimateByte commented on GitHub (Feb 12, 2016):

I'll have a look at it soon.

<!-- gh-comment-id:183434742 --> @UltimateByte commented on GitHub (Feb 12, 2016): I'll have a look at it soon.
Author
Owner

@jaredballou commented on GitHub (Feb 12, 2016):

A much faster and less kludgy install finder is this:

wget "https://www.teamspeak.com/downloads" -q -O -|grep -oi "[^\"]\+teamspeak3-server_linux_${ts3arch}[^\"]\+"

This will return a list of URLs to try, you could split the version out of those fairly easily as well.

<!-- gh-comment-id:183462902 --> @jaredballou commented on GitHub (Feb 12, 2016): A much faster and less kludgy install finder is this: ``` bash wget "https://www.teamspeak.com/downloads" -q -O -|grep -oi "[^\"]\+teamspeak3-server_linux_${ts3arch}[^\"]\+" ``` This will return a list of URLs to try, you could split the version out of those fairly easily as well.
Author
Owner

@jaredballou commented on GitHub (Feb 12, 2016):

Also I see we have a lot of code duplication between the update/install/dl scripts for TeamSpeak. Shouldn't that latest version check and download/install function be abstracted as a new function file, and then included in those places it's currently used?

<!-- gh-comment-id:183466012 --> @jaredballou commented on GitHub (Feb 12, 2016): Also I see we have a lot of code duplication between the update/install/dl scripts for TeamSpeak. Shouldn't that latest version check and download/install function be abstracted as a new function file, and then included in those places it's currently used?
Author
Owner

@UltimateByte commented on GitHub (Feb 14, 2016):

OK, so the issue is with how numbers get sorted.

Here is the top of the .ts3_version_numbers.tmp i get :

3.0.18
3.0.18.2
3.0.18.1
3.0.17
3.0.16
3.0.15
3.0.15.1
3.0.14
3.0.13
3.0.13.1
3.0.12
3.0.12.1
3.0.11.4
3.0.11
3.0.11.3
3.0.11.2
3.0.11.1

As you can see, 3.0.12 is considered as superior than 3.0.12.1

Line to correct :

https://github.com/dgibbs64/linuxgsm/blob/master/functions/update_check.sh#L233

# merges 2 files and orders by each column in order allowing these version numbers to be sorted in order
paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort  -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp

Maybe just putting things in that order would be enough : sort -k1rn -k2rn -k4rn -k3rn.
=> Tested, nope, blank is superior to non blank, and removing the reverse isn't a good solution as 3.0.12.2 would become inferior to 3.0.12.1.

I think i may have the keys to simplify that whole thing with the help of : http://www.skorks.com/2010/05/sort-files-like-a-master-with-the-linux-sort-command-bash/

I'll see that later, need to sleep right now :o))

<!-- gh-comment-id:183828934 --> @UltimateByte commented on GitHub (Feb 14, 2016): OK, so the issue is with how numbers get sorted. Here is the top of the .ts3_version_numbers.tmp i get : ``` 3.0.18 3.0.18.2 3.0.18.1 3.0.17 3.0.16 3.0.15 3.0.15.1 3.0.14 3.0.13 3.0.13.1 3.0.12 3.0.12.1 3.0.11.4 3.0.11 3.0.11.3 3.0.11.2 3.0.11.1 ``` As you can see, 3.0.12 is considered as superior than 3.0.12.1 Line to correct : https://github.com/dgibbs64/linuxgsm/blob/master/functions/update_check.sh#L233 ``` # merges 2 files and orders by each column in order allowing these version numbers to be sorted in order paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp ``` Maybe just putting things in that order would be enough : `sort -k1rn -k2rn -k4rn -k3rn`. => Tested, nope, blank is superior to non blank, and removing the reverse isn't a good solution as 3.0.12.2 would become inferior to 3.0.12.1. I think i may have the keys to simplify that whole thing with the help of : http://www.skorks.com/2010/05/sort-files-like-a-master-with-the-linux-sort-command-bash/ I'll see that later, need to sleep right now :o))
Author
Owner

@UltimateByte commented on GitHub (Feb 14, 2016):

EUREKA !
I can simplify this a lot ! No need to use paste / awk, no need to remove dots, no need to have 3 files...
sortcan take care of ".", and can sort version numbers natively, and output a file !
The magic command is : cat .ts3_version_numbers_unsorted.tmp | sort -r -t. --version-sort -o .ts3_version_numbers_sorted.tmp

Before :

# Grabs all version numbers but not in correct order
wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp

# Replaces dots with spaces to split up the number. e.g 3 0 12 1 is 3.0.12.1 this allows correct sorting
 cat .ts3_version_numbers_unsorted.tmp | tr "." " " > .ts3_version_numbers_digit.tmp
# Sorts versions in to correct order
# merges 2 files and orders by each column in order allowing these version numbers to be sorted in order
paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort  -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp

# Finds directory with most recent server version.
while read ts3_version_number; do
    wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2"
    if [ $? -eq 0 ]; then
        availablebuild="${ts3_version_number}"
        # Break while-loop, if the latest release could be found
        break
    fi
done < .ts3_version_numbers.tmp

# tidy up
rm -f ".ts3_version_numbers_digit.tmp"
rm -f ".ts3_version_numbers_unsorted.tmp"
rm -f ".ts3_version_numbers.tmp"

After :

# Grabs all version numbers but not in correct order
wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp

# Sort version numbers
cat .ts3_version_numbers_unsorted.tmp | sort -r -t. --version-sort  -o .ts3_version_numbers_sorted.tmp

# Finds directory with most recent server version.
while read ts3_version_number; do
    wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2"
    if [ $? -eq 0 ]; then
        availablebuild="${ts3_version_number}"
        # Break while-loop, if the latest release could be found
        break
    fi
done < .ts3_version_numbers_sorted.tmp

# tidy up
rm -f ".ts3_version_numbers_unsorted.tmp"
rm -f ".ts3_version_numbers_sorted.tmp"

Tested working, and should work for a while !
Pull requesting this right now !

Edit : doesn't even need the -t. with --version-sort

<!-- gh-comment-id:183910079 --> @UltimateByte commented on GitHub (Feb 14, 2016): EUREKA ! I can simplify this a lot ! No need to use paste / awk, no need to remove dots, no need to have 3 files... `sort`can take care of ".", and can sort version numbers natively, and output a file ! The magic command is : cat .ts3_version_numbers_unsorted.tmp | sort -r -t. --version-sort -o .ts3_version_numbers_sorted.tmp Before : ``` # Grabs all version numbers but not in correct order wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp # Replaces dots with spaces to split up the number. e.g 3 0 12 1 is 3.0.12.1 this allows correct sorting cat .ts3_version_numbers_unsorted.tmp | tr "." " " > .ts3_version_numbers_digit.tmp # Sorts versions in to correct order # merges 2 files and orders by each column in order allowing these version numbers to be sorted in order paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp # Finds directory with most recent server version. while read ts3_version_number; do wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" if [ $? -eq 0 ]; then availablebuild="${ts3_version_number}" # Break while-loop, if the latest release could be found break fi done < .ts3_version_numbers.tmp # tidy up rm -f ".ts3_version_numbers_digit.tmp" rm -f ".ts3_version_numbers_unsorted.tmp" rm -f ".ts3_version_numbers.tmp" ``` After : ``` # Grabs all version numbers but not in correct order wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp # Sort version numbers cat .ts3_version_numbers_unsorted.tmp | sort -r -t. --version-sort -o .ts3_version_numbers_sorted.tmp # Finds directory with most recent server version. while read ts3_version_number; do wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" if [ $? -eq 0 ]; then availablebuild="${ts3_version_number}" # Break while-loop, if the latest release could be found break fi done < .ts3_version_numbers_sorted.tmp # tidy up rm -f ".ts3_version_numbers_unsorted.tmp" rm -f ".ts3_version_numbers_sorted.tmp" ``` Tested working, and should work for a while ! Pull requesting this right now ! Edit : doesn't even need the -t. with --version-sort
Author
Owner

@lock[bot] commented on GitHub (Jul 19, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406290658 --> @lock[bot] commented on GitHub (Jul 19, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#557
No description provided.