diff --git a/package/unios_2.x.sh b/package/unios_2.x.sh index c6e5401..fc5d208 100644 --- a/package/unios_2.x.sh +++ b/package/unios_2.x.sh @@ -40,12 +40,13 @@ _tailscale_install() { tailscale_version="${1:-$(curl -sSLq --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/?mode=json" | jq -r '.Tarballs.arm64 | capture("tailscale_(?[^_]+)_").version')}" - echo "Installing latest Tailscale package repository key..." - curl -fsSL --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/${ID}/${VERSION_CODENAME}.gpg" | apt-key add - - - if [ ! -f "/etc/apt/sources.list.d/tailscale.list" ]; then - echo "Installing Tailscale package repository..." + echo "Installing latest Tailscale package repository..." + if [ "${VERSION_CODENAME}" = "stretch" ]; then + curl -fsSL --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/${ID}/${VERSION_CODENAME}.gpg" | apt-key add - curl -fsSL --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/${ID}/${VERSION_CODENAME}.list" | tee /etc/apt/sources.list.d/tailscale.list + else + curl -fsSLo /usr/share/keyrings/tailscale-archive-keyring.gpg --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/${ID}/${VERSION_CODENAME}.noarmor.gpg" + curl -fsSLo /etc/apt/sources.list.d/tailscale.list --ipv4 "https://pkgs.tailscale.com/${TAILSCALE_CHANNEL}/${ID}/${VERSION_CODENAME}.tailscale-keyring.list" fi echo "Updating package lists..."