Debian Codegraph @

debian/postrm

raw
1 #!/bin/sh
2
3 set -e
4
5 case "$1" in
6 purge)
7 # remove the user database
8 rm -f /var/lib/jabberd2/db/*
9 rm -f /var/lib/jabberd2/*.db
10 for SUB in c2s s2s sm router; do
11 # the application should remove these on exit
12 rm -f /var/run/jabberd2/${SUB}.pid
13 # need better way of detecting whether these exist or not
14 rm -f /var/log/jabberd2/${SUB}.log*
15 done
16 # remove any empty directories
17 for DIR in /etc/jabberd2/component.d /var/lib/jabberd2/db \
18 /var/lib/jabberd2 /etc/jabberd2 \
19 /var/run/jabberd2 /var/log/jabberd2; do
20 if [ -d ${DIR} ]; then
21 #rmdir -p --ignore-fail-on-non-empty ${DIR} > /dev/null 2>&1
22 rmdir --ignore-fail-on-non-empty ${DIR} > /dev/null 2>&1
23 fi
24 done
25 ;;
26 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
27 ;;
28
29 *)
30 echo "postrm called with unknown argument \`$1'" >&2
31 exit 1
32 ;;
33 esac
34
35 #DEBHELPER#
36
37 exit 0