equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 # postrm script for mercurial-server |
|
3 |
|
4 set -e |
|
5 |
|
6 # Load debconf |
|
7 . /usr/share/debconf/confmodule |
|
8 |
|
9 # Check if the user wants the repositories removed on purging |
|
10 remove_repositories_on_purge() { |
|
11 db_get mercurial-server/purge_repositories || RET=false |
|
12 if [ "$RET" = "true" ]; then |
|
13 return 0 |
|
14 else |
|
15 return 1 |
|
16 fi |
|
17 } |
|
18 |
|
19 case "$1" in |
|
20 purge) |
|
21 if remove_repositories_on_purge; then |
|
22 echo -n "Removing hg user and purging data..." |
|
23 deluser --remove-home --quiet --system hg > /dev/null || true |
|
24 delgroup --quiet --system hg > /dev/null || true |
|
25 echo done |
|
26 fi |
|
27 ;; |
|
28 |
|
29 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
|
30 ;; |
|
31 |
|
32 *) |
|
33 echo "postrm called with unknown argument \`$1'" >&2 |
|
34 exit 1 |
|
35 ;; |
|
36 esac |
|
37 |
|
38 # dh_installdeb will replace this with shell code automatically |
|
39 # generated by other debhelper scripts. |
|
40 |
|
41 #DEBHELPER# |
|
42 |
|
43 exit 0 |