5 . /usr/share/debconf/confmodule
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
18 rm -f /etc/alternc/local.sh /etc/alternc/my_mail.cnf /etc/alternc/bureau.conf
19 rm -f /var/lib/alternc/backups/etc-installed.tar.gz
20 rm -f /etc/incron.d/alternc
22 # FIXME : remove following commented lines if we are sure
23 # to not drop database and remove files (except /etc/alternc)
24 # when Alternc is purged
26 # Maybe tell to user how to do if he want to drop db and/or remove files ?
29 #db_input high alternc/postrm_remove_databases || true
31 #db_get alternc/postrm_remove_databases || true
32 #if [ "$RET" = "true" ]; then
33 # /usr/bin/mysql --defaults-file=/etc/alternc/my.cnf -Bs -e "DROP DATABASE $ALTERNC_DB"
37 #db_input high alternc/postrm_remove_datafiles || true
39 #db_get alternc/postrm_remove_datafiles || true
40 #if [ "$RET" = "true" ]; then
41 # rm -rf /var/lib/alternc/backups /var/alternc/dns /var/alternc/html /var/alternc/redir
45 #db_input high alternc/postrm_remove_bind || true
47 #db_get alternc/postrm_remove_bind || true
48 #if [ "$RET" = "true" ]; then
49 # rm -rf /var/alternc/bind /etc/bind/templates
53 #db_input high alternc/postrm_remove_mailboxes || true
55 #db_get alternc/postrm_remove_mailboxes || true
56 #if [ "$RET" = "true" ]; then
57 # rm -rf /var/alternc/mail
60 #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
61 rm -f /etc/apache*/conf.d/override_php.conf /etc/apache*/conf.d/alternc-ssl.conf /etc/apache*/conf.d/alternc.conf
62 rm -f /etc/php*/conf.d/alternc.ini
64 # Restore orignals conf files which have been replaced by Alternc
65 # With the oldest tar found
66 BACKUP=$(ls /var/lib/alternc/backups/etc-original*.tar.gz | head -n 1)
67 tar -C / -xf "$BACKUP" 2>/dev/null || true
69 # Reload services which use these files
70 for service in bind9 postfix proftpd dovecot apache2; do
71 invoke-rc.d $service force-reload || true
75 remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
80 echo "postrm called with unknown argument \`$1'" >&2
85 # dh_installdeb will replace this with shell code automatically
86 # generated by other debhelper scripts.
90 # important: postrm freezes withtout that: