Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mygrexit/7295d3980dfee87b62aa31cc5e348ea5 to your computer and use it in GitHub Desktop.
Save mygrexit/7295d3980dfee87b62aa31cc5e348ea5 to your computer and use it in GitHub Desktop.
Tailscale Unraid Setup
# /boot/config/go
# add the following...
# Tailscale
bash /boot/config/tailscale/install.sh
bash /boot/config/tailscale/start.sh
#!/bin/bash
# /boot/config/tailscale/install.sh
tar -xf /boot/config/tailscale/tailscale_static.tgz -C /usr/bin/ --strip-components=1 --no-anchored tailscale
tar -xf /boot/config/tailscale/tailscale_static.tgz -C /usr/sbin/ --strip-components=1 --no-anchored tailscaled
#!/bin/bash
# /boot/config/tailscale/start.sh
exec >/tmp/tailscaled.log 2>&1
setsid /usr/sbin/tailscaled -statedir=/boot/config/tailscale/ &
#!/bin/bash
set -x
# check latest version against what's installed
VER=$(curl -sL https://api.github.com/repos/tailscale/tailscale/releases/latest | jq -r ".tag_name" | cut -c 2-)
if [ "$VER" = "$(tailscale version | head -n1)" ]; then
echo "$VER already installed, exiting..."
exit 0
fi
# download latest version, restart daemon
curl -fsSL -o /boot/config/tailscale/tailscale_static.tgz "https://pkgs.tailscale.com/stable/tailscale_${VER}_amd64.tgz"
if [ $? -eq 0 ]; then
pkill tailscaled
sleep 1
/usr/sbin/tailscaled -cleanup
bash /boot/config/tailscale/install.sh
bash /boot/config/tailscale/start.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment