summaryrefslogtreecommitdiffstats
path: root/debian/git-daemon-run.postrm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:47:55 +0000
commitf04f772d4c2791a1bc0e36fe8df2dc8d62ea8378 (patch)
tree6601becfb9eccb5e3361f1f802e96ea7839bfca8 /debian/git-daemon-run.postrm
parentAdding upstream version 1:2.39.2. (diff)
downloadgit-f04f772d4c2791a1bc0e36fe8df2dc8d62ea8378.tar.xz
git-f04f772d4c2791a1bc0e36fe8df2dc8d62ea8378.zip
Adding debian version 1:2.39.2-1.1.debian/1%2.39.2-1.1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/git-daemon-run.postrm22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/git-daemon-run.postrm b/debian/git-daemon-run.postrm
new file mode 100644
index 0000000..f6aa282
--- /dev/null
+++ b/debian/git-daemon-run.postrm
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+test "$1" = 'purge' || exit 0
+
+sv down /etc/sv/git-daemon 2>/dev/null || :
+sv down /etc/sv/git-daemon/log 2>/dev/null || :
+sv force-shutdown /etc/sv/git-daemon 2>/dev/null || :
+sv force-stop /etc/sv/git-daemon/log 2>/dev/null || :
+rm -rf /etc/sv/git-daemon/supervise /etc/sv/git-daemon/log/supervise
+rm -rf /var/lib/supervise/git-daemon /var/lib/supervise/git-daemon.log
+
+for i in '@*' current config lock state; do
+ rm -f /var/log/git-daemon/$i
+done
+rmdir /var/log/git-daemon || :
+
+getent passwd gitlog >/dev/null || exit 0
+! deluser --version >/dev/null 2>&1 || exec deluser -f gitlog
+echo 'deluser program not available, not removing system user "gitlog".' >&2