2024-01-03 00:29:24 +00:00
|
|
|
#!/bin/sh
|
2023-02-24 21:22:21 +00:00
|
|
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
|
|
|
deb-systemd-helper unmask 'tailscaled.service' >/dev/null || true
|
|
|
|
if deb-systemd-helper --quiet was-enabled 'tailscaled.service'; then
|
|
|
|
deb-systemd-helper enable 'tailscaled.service' >/dev/null || true
|
|
|
|
else
|
|
|
|
deb-systemd-helper update-state 'tailscaled.service' >/dev/null || true
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d /run/systemd/system ]; then
|
|
|
|
systemctl --system daemon-reload >/dev/null || true
|
|
|
|
deb-systemd-invoke restart 'tailscaled.service' >/dev/null || true
|
|
|
|
fi
|
|
|
|
fi
|