aboutsummarylogtreecommitdiffstats
path: root/tailscale_hook
diff options
context:
space:
mode:
Diffstat (limited to 'tailscale_hook')
-rw-r--r--tailscale_hook2
1 files changed, 2 insertions, 0 deletions
diff --git a/tailscale_hook b/tailscale_hook
index c0529c5165e3..8fd12c763eba 100644
--- a/tailscale_hook
+++ b/tailscale_hook
@@ -5,6 +5,7 @@ run_hook() (
. /etc/default/tailscaled
# Launch tailscale agent in the background
+ /usr/sbin/tailscaled --cleanup
/usr/sbin/tailscaled \
--state=/var/lib/tailscale/tailscaled.state \
--socket=/run/tailscale/tailscaled.sock \
@@ -14,6 +15,7 @@ run_hook() (
)
run_cleanuphook() {
+ /usr/sbin/tailscaled --cleanup
local pid=$(cat /run/tailscaled.pid 2>/dev/null)
[[ -z $pid ]] || kill "$pid"
}