~ubuntu-branches/ubuntu/precise/maas/precise-updates

« back to all changes in this revision

Viewing changes to debian/maas-region-controller.postrm

Tags: 1.2+bzr1373+dfsg-0ubuntu1~12.04.4
* SECURITY UPDATE: failure to authenticate downloaded content (LP: #1039513)
  - debian/patches/CVE-2013-1058.patch: Authenticate downloaded files with
    GnuPG and MD5SUM files. Thanks to Julian Edwards.
  - CVE-2013-1058
* SECURITY UPDATE: configuration options may be loaded from current working
  directory (LP: #1158425)
  - debian/patches/CVE-2013-1057-1-2.patch: Do not load configuration
    options from the current working directory. Thanks to Julian Edwards.
  - CVE-2013-1057

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
. /usr/share/debconf/confmodule
 
6
 
 
7
if [ -f /etc/dbconfig-common/maas.conf ]; then
 
8
        if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
 
9
                . /usr/share/dbconfig-common/dpkg/postrm.pgsql
 
10
                dbc_go maas-region-controller $@
 
11
        fi
 
12
fi
 
13
 
 
14
case "$1" in
 
15
        purge)
 
16
                rm -rf /var/log/maas
 
17
                rm -rf /var/lib/maas
 
18
                if [ -h /etc/apache2/conf.d/maas-http.conf ]; then
 
19
                        rm -rf /etc/apache2/conf.d/maas-http.conf
 
20
                fi
 
21
 
 
22
                # Restarting apache2
 
23
                if [ -x /usr/sbin/invoke-rc.d ]; then
 
24
                        invoke-rc.d apache2 restart || true
 
25
                fi
 
26
 
 
27
                # Delete symlink
 
28
                if [ -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
 
29
                        rm -rf /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
 
30
                fi
 
31
 
 
32
                # Remove rabbitmq/longpoll/celery
 
33
                longpoll_user="maas_longpoll"
 
34
                longpoll_vhost="/maas_longpoll"
 
35
                workers_user="maas_workers"
 
36
                workers_vhost="/maas_workers"
 
37
                if [ -x /usr/sbin/rabbitmqctl ]; then
 
38
                        rabbitmqctl delete_vhost "$longpoll_vhost" || true
 
39
                        rabbitmqctl delete_user "$longpoll_user" || true
 
40
 
 
41
                        rabbitmqctl delete_vhost "$workers_vhost" || true
 
42
                        rabbitmqctl delete_user "$workers_user" || true
 
43
                fi
 
44
esac
 
45
 
 
46
#DEBHELPER#
 
47
 
 
48
db_stop