Skip to content

Commit

Permalink
fix: Resolve issue with installed version on UniFi OS 2.x+ (fixes #43)
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Feb 11, 2023
1 parent 387e5c2 commit f1b4211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/unios_2.x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _tailscale_stop() {
}

_tailscale_install() {
VERSION="${1:-$(curl -sSLq --ipv4 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r '.Tarballs.arm64 | capture("tailscale_(?<version>[^_]+)_").version')}"
tailscale_version="${1:-$(curl -sSLq --ipv4 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r '.Tarballs.arm64 | capture("tailscale_(?<version>[^_]+)_").version')}"

if [ ! -f "/etc/apt/sources.list.d/tailscale.list" ]; then
# shellcheck source=tests/os-release
Expand All @@ -44,8 +44,8 @@ _tailscale_install() {
echo "Updating package lists..."
apt update

echo "Installing Tailscale ${VERSION}..."
apt install -y tailscale="${VERSION}"
echo "Installing Tailscale ${tailscale_version}..."
apt install -y tailscale="${tailscale_version}"

echo "Configuring Tailscale to use userspace networking..."
sed -i 's/FLAGS=""/FLAGS="--state /data/tailscale/tailscaled.state --tun userspace-networking"/' /etc/default/tailscaled || {
Expand Down

0 comments on commit f1b4211

Please sign in to comment.