From 071e4c910e5478d6d259c4ffdd6f2a552e12a085 Mon Sep 17 00:00:00 2001 From: Duncan Gibson Date: Sat, 22 Jul 2023 10:03:06 -0400 Subject: [PATCH] let's try this? --- tailscale.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tailscale.sh b/tailscale.sh index d86d66e..7762dd9 100644 --- a/tailscale.sh +++ b/tailscale.sh @@ -75,20 +75,21 @@ echo "done." echo "Starting services..." -if systemctl is-enabled --quiet systemd-sysext && systemctl is-active --quiet systemd-sysext; then - echo "systemd-sysext is already enabled and active" +systemctl enable systemd-sysext +systemctl restart systemd-sysext + +systemd-sysext refresh +systemctl daemon-reload + +systemctl enable tailscaled + +if systemctl is-active --quiet tailscaled; then + echo "Upgrade complete. Restarting tailscaled..." else - systemctl enable systemd-sysext --now + echo "Install complete. Starting tailscaled..." fi -systemd-sysext refresh > /dev/null 2>&1 -systemctl daemon-reload > /dev/null +# This needs to be the last thing we do in case the user's running this over Tailscale SSH. +systemctl restart tailscaled -if systemctl is-enabled --quiet tailscaled && systemctl is-active --quiet tailscaled; then - echo "tailscaled is already enabled and active; restarting it..." - systemctl restart tailscaled -else - systemctl enable tailscaled --now -fi - -echo "Tailscale installed and ready." +echo "Done."