still not a clue
release / build (push) Successful in 1m12s

This commit is contained in:
lda
2025-08-25 09:42:11 +07:00 Unverified
parent 2392477ec8
commit bfd1b626d5
8 changed files with 38 additions and 18 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/bin/sh
set -e
# 0th step from lda is to move the pre assed resolv.conf to the real resolv.conf
[ -f /tmp/resolv.conf ] && cp -af /tmp/resolv.conf /etc/resolv.conf || ([ -f /rom/etc/resolv.conf ] && cp -af /rom/etc/resolv.conf /etc/resolv.conf)
# 1. Fetch the latest version number from Tailscale's site
LATEST=$(curl -s https://pkgs.tailscale.com/stable/ | grep -Eo 'tailscale_[0-9\.]+_arm.tgz' | head -n1)
[ -z "$LATEST" ] && {
echo "❌ Couldn't find latest ARM binary."
exit 1
}
URL="https://pkgs.tailscale.com/stable/${LATEST}"
cd /var/tmp
[ -f "$LATEST" ] && {
echo "file exists"
rm "$LATEST"
}
echo "Downloading $LATEST..."
wget -q "$URL"
echo "got"
# 2. Extract binaries
# workaroubd
stripped=$(basename "$LATEST" .tgz)
tar xzf "$LATEST" --strip-components=1 "$stripped/tailscale" "$stripped/tailscaled"
echo "unzipped"
# 3. Install and set permissions
chmod +x tailscale tailscaled
mv tailscale tailscaled /usr/sbin/
# 4. Restart service
/etc/init.d/tailscale restart
# 5. Cleanup
rm "$LATEST"
echo "✅ Updated to $(tailscale version)"