-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtailscale
More file actions
executable file
·26 lines (21 loc) · 833 Bytes
/
tailscale
File metadata and controls
executable file
·26 lines (21 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Install tailscale
set -u
if [ ! -e /etc/yum.repos.d/tailscale.repo ]; then
echo "Installing repo..."
sudo curl -s https://pkgs.tailscale.com/stable/fedora/tailscale.repo -o /etc/yum.repos.d/tailscale.repo > /dev/null
# Disable repo_gpgcheck, which doesn't work on Silverblue 36+
sudo sed -i 's/repo_gpgcheck=1/repo_gpgcheck=0/' /etc/yum.repos.d/tailscale.repo
fi
# Check if tailscale is already installed
rpm -q tailscale > /dev/null
if [ $? -eq 1 ]; then
echo "Installing tailscale package..."
rpm-ostree install tailscale
echo "Please reboot to finish installation of the layered package and re-run this script to enable tailscale."
exit 0
fi
echo "Enabling tailscale (systemd)..."
sudo systemctl enable --now tailscaled > /dev/null
echo "Starting tailscale..."
sudo tailscale up