Skip to content

[Teamspeak6 Server] Issue Install script fails — wrong asset naming pattern, wrong compression tooling/format, and incorrect --strip-components #99

Description

@blungoo

/Egg: Teamspeak6 Server
File: voice/teamspeak6_server/egg-teamspeak6-server.json

Issue Description:

This egg's installation script fails to correctly download and extract TeamSpeak 6 server releases due to several mismatches with the actual GitHub release assets.

Issues found:

  1. Wrong package installed for extraction
    The script installs bzip2 via apt, but the release assets are .tar.xz (xz-compressed), not .tar.bz2. The correct package would be xz-utils.
  2. Asset name pattern mismatch
    The script filters for assets where the name contains linux_amd64 (underscore) and ends with .tar.bz2. The actual release assets use a hyphen and .tar.xz, e.g. teamspeak6-server-linux-amd64.tar.xz. Because of this, the jq filter matches nothing, url comes back null, and the script exits with:
    Not found: <version>
    even though a valid release exists.
  3. Wrong tar extraction flag
    The script extracts with tar xj (bzip2 mode). Since the actual assets are .tar.xz, this needs to be tar xJ (capital J, xz mode) — otherwise extraction fails outright even if the correct URL is found.
  4. Incorrect --strip-components=1
    Once the correct asset is downloaded and extracted, --strip-components=1 causes broken extraction. Older TeamSpeak releases were wrapped in a single top-level folder, but the TS6 beta tarballs are not — files are already rooted at doc/, serverquerydocs/, sql/, etc., with the server binary at the archive root. With --strip-components=1, any file at the archive root (including the server binary itself) is silently skipped during extraction, while other files are shifted up one directory level incorrectly. Extraction appears to succeed with no error, but the server binary never actually ends up in /mnt/server, so the server fails to start and the panel shows it as offline with no clear indication why.

Suggested fix:

cd /mnt/server

apt-get update
apt-get install -y jq xz-utils

ver="$TS_VERSION"
if [ -z "$ver" ] || [ "$ver" = "latest" ]; then
    json=$(curl -sSL https://api.github.com/repos/teamspeak/teamspeak6-server/releases/latest)
else
    json=$(curl -sSL https://api.github.com/repos/teamspeak/teamspeak6-server/releases/tags/$ver 2>/dev/null)
    if echo "$json" | grep -q "Not Found"; then
        altver=$(echo "$ver" | sed 's/-/\//')
        json=$(curl -sSL https://api.github.com/repos/teamspeak/teamspeak6-server/releases/tags/$altver 2>/dev/null)
    fi
fi

if echo "$json" | grep -q "Not Found"; then
    echo "Not found: $ver"
    exit 1
fi

url=$(echo "$json" | jq -r '.assets | map(select((.name | contains("linux-amd64")) and (.name | endswith(".tar.xz"))))[0].browser_download_url')

if [ -z "$url" ] || [ "$url" = "null" ]; then
    echo "Not found: $ver"
    exit 1
fi

curl -sSL "$url" | tar xJ
echo "Installed"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions