root/alternc/trunk/debian/alternc.postrm

Revision 2433, 2.0 kB (checked in by anarcat, 2 months ago)

move sessions to a shared /var/alternc/sessions

  • Property svn:mergeinfo set to
Line 
1 #! /bin/sh
2
3 set -e
4
5 . /usr/share/debconf/confmodule
6
7 #     * postrm remove
8 #     * postrm purge
9 #     * old-postrm upgrade new-version
10 #     * new-postrm failed-upgrade old-version
11 #     * new-postrm abort-install
12 #     * new-postrm abort-install old-version
13 #     * new-postrm abort-upgrade old-version
14 #     * disappearer's-postrm disappear overwriter overwriter-version
15
16 case "$1" in
17   purge)
18     rm -f /etc/alternc/local.sh /etc/alternc/my.cnf /etc/alternc/bureau.conf
19     rm -f /var/backups/alternc/etc-installed.tar.gz
20
21     # Purge database?
22     db_input high alternc/postrm_remove_databases || true
23     db_go
24     db_get alternc/postrm_remove_databases || true
25     if [ "$RET" = "true" ]; then
26       rm -rf /var/alternc/db
27     fi
28
29     # Purge datafiles?
30     db_input high alternc/postrm_remove_datafiles || true
31     db_go
32     db_get alternc/postrm_remove_datafiles || true
33     if [ "$RET" = "true" ]; then
34       rm -rf /var/backups/alternc /var/alternc/dns /var/alternc/html /var/alternc/redir
35     fi
36
37     # Purge bind zones
38     db_input high alternc/postrm_remove_bind || true
39     db_go
40     db_get alternc/postrm_remove_bind || true
41     if [ "$RET" = "true" ]; then
42       rm -rf /var/alternc/bind /etc/bind/templates
43     fi
44
45     # Purge mailboxes
46     db_input high alternc/postrm_remove_mailboxes || true
47     db_go
48     db_get alternc/postrm_remove_mailboxes || true
49     if [ "$RET" = "true" ]; then
50       rm -rf /var/alternc/mail
51     fi
52
53     rm -rf /var/alternc/apacheconf /var/alternc/cgi-bin /var/alternc/bureau /var/alternc/exec.usr /var/alternc/mla /var/alternc/redir /var/alternc/tmp /var/log/alternc
54     rm -f /etc/apache*/conf.d/override_php.conf /etc/apache*/conf.d/alternc-ssl.conf /etc/apache*/conf.d/alternc.conf
55     rm -f /etc/php*/conf.d/alternc.ini
56     ;;
57   remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
58     ;;
59   disappear)
60     ;;
61   *)
62     echo "postrm called with unknown argument \`$1'" >&2
63     exit 1
64     ;;
65 esac
66
67 # dh_installdeb will replace this with shell code automatically
68 # generated by other debhelper scripts.
69
70 #DEBHELPER#
71
72 exit 0
73
74 # vim: et sw=4
Note: See TracBrowser for help on using the browser.