release: open-source release build logic for unix packages

Updates tailscale/corp#9221

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2023-02-24 13:22:21 -08:00
committed by Dave Anderson
parent 44e027abca
commit fc4b25d9fd
12 changed files with 1071 additions and 0 deletions

17
release/deb/debian.postrm.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -e
if [ -d /run/systemd/system ] ; then
systemctl --system daemon-reload >/dev/null || true
fi
if [ -x "/usr/bin/deb-systemd-helper" ]; then
if [ "$1" = "remove" ]; then
deb-systemd-helper mask 'tailscaled.service' >/dev/null || true
fi
if [ "$1" = "purge" ]; then
deb-systemd-helper purge 'tailscaled.service' >/dev/null || true
deb-systemd-helper unmask 'tailscaled.service' >/dev/null || true
rm -rf /var/lib/tailscale
fi
fi