File: git-daemon-run.postrm

package info (click to toggle)
git 1:2.11.0-3+deb9u4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,344 kB
  • sloc: ansic: 175,978; sh: 154,654; perl: 29,746; tcl: 21,549; python: 6,781; makefile: 3,405; lisp: 1,786; php: 120; asm: 98; csh: 45
file content (22 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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