~sbeattie/ubuntu/oneiric/dovecot/dovecot-lp792557

« back to all changes in this revision

Viewing changes to debian/dovecot-postfix.postrm

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Ante Karamatic
  • Date: 2010-04-19 13:13:20 UTC
  • Revision ID: james.westby@ubuntu.com-20100419131320-zoem40bavuyyzxww
Tags: 1:1.2.9-1ubuntu6
[Ante Karamatic]
* dovecot-example.conf, debian/dovecot-common.dirs, debian/01-dovecot-postfix.auth,
     debian/01-dovecot-postfix.conf, debian/control, debian/dovecot-postfix.dirs,
     debian/dovecot-postfix.postinst, debian/dovecot-postfix.postrm, debian/dovecot-postfix.preinst,
     debian/rules:
     * Fix dovecot -n not to report wrong configuration. (LP: #511295) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
export PATH
8
8
 
9
9
if [ "$1" = "remove" -o "$1" = "purge" ]; then
10
 
        # Handle dovecot configuration
11
 
        if which ucf >/dev/null; then
12
 
                if [ "$1" = "remove" ]; then
13
 
                        # On remove just move dovecot-postfix.conf out of the 
14
 
                        # way so that dovecot init script doesn't pick it up.
15
 
                        mv /etc/dovecot/dovecot-postfix.conf /etc/dovecot/dovecot-postfix.conf.disabled
16
 
                elif [ "$1" = "purge" ]; then
17
 
                        rm -f /etc/dovecot/dovecot-postfix.conf
18
 
                        rm -f /etc/dovecot/dovecot-postfix.conf.disabled
19
 
                        rm -f /etc/dovecot/dovecot-postfix.conf.ucf*
20
 
                        ucf --purge /etc/dovecot/dovecot-postfix.conf
21
 
                        if which ucfr >/dev/null; then
22
 
                                ucfr --purge dovecot-postfix /etc/dovecot/dovecot-postfix.conf
23
 
                        fi
24
 
                fi
25
 
        fi
26
10
        if [ -x "/etc/init.d/dovecot" ]; then
27
11
                if [ -x /usr/sbin/invoke-rc.d ]; then
28
12
                        invoke-rc.d dovecot restart
29
13
                else
30
 
                        /etc/init.d/dovecot restart
 
14
                        service dovecot restart
31
15
                fi
32
16
        fi
33
17
        # Restore postfix configuration
41
25
        fi
42
26
        if [ -x "/etc/init.d/postfix" ]; then
43
27
                if [ -x /usr/sbin/invoke-rc.d ]; then
44
 
                        invoke-rc.d postfix reload
 
28
                        invoke-rc.d postfix restart
45
29
                else
46
 
                        /etc/init.d/postfix reload
 
30
                        service postfix restart
47
31
                fi
48
32
        fi
49
33
fi