Fix installation for silc-client and silc-toolkit packages
[silc.git] / debian-silc-server / postrm
1 #!/bin/sh
2
3 set -e
4
5 CONFIGDIR="/etc/silcd"
6 CONFIGFILE="$CONFIGDIR/silcd.conf"
7 IPCONFIGFILE="$CONFIGDIR/silcd-primary-ip.conf"
8 ADMINCONFIGFILE="$CONFIGDIR/silcd-admin.conf"
9
10 case "$1" in
11     purge)
12         if [ -d /var/log/silcd ]; then
13             rm -rf /var/log/silcd
14         fi
15
16         # Remove conffile from ucf's database if ucf is available
17         if [ -x /usr/bin/ucf ]; then
18             for conffile in "$CONFIGFILE" "$IPCONFIGFILE" "$ADMINCONFIGFILE"; do
19                 ucf --purge "$conffile"
20             done
21
22         fi
23
24         # Remove silcd configuration directory
25         rm -rf "$CONFIGDIR"
26         ;;
27
28     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
29         ;;
30
31     *)
32         echo "postrm called with unknown argument \`$1'" >&2
33         exit 1
34     ;;
35 esac
36
37 #DEBHELPER#
38
39 exit 0
40
41 # vim: et sw=4