From b9a45931915e5f9f6a9db5534d444176969f0e6c Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 2 Sep 2014 18:12:06 +0530 Subject: [PATCH] Fixed Dovcot not removing in Ubuntu 12.04 --- src/modules/stack/install/mail/ee_mod_setup_dovecot.sh | 5 +++-- src/modules/stack/remove/mail/ee_mod_remove_dovecot.sh | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/stack/install/mail/ee_mod_setup_dovecot.sh b/src/modules/stack/install/mail/ee_mod_setup_dovecot.sh index 623b54b7..a22d254a 100644 --- a/src/modules/stack/install/mail/ee_mod_setup_dovecot.sh +++ b/src/modules/stack/install/mail/ee_mod_setup_dovecot.sh @@ -58,8 +58,9 @@ function ee_mod_setup_dovecot() || ee_lib_error "Unable to setup Dovecot SSL certificate path, exit status = " $? # Setting Dovecot init.d script - cp -v /usr/share/easyengine/mail/dovecot /etc/init.d/dovecot &>> $EE_COMMAND_LOG - + if [ ! -f /etc/init.d/dovecot ];then + cp -v /usr/share/easyengine/mail/dovecot /etc/init.d/dovecot &>> $EE_COMMAND_LOG + fi # Add autocreate plugin sed -i "s'#mail_plugins = \$mail_plugins'mail_plugins = \$mail_plugins autocreate'" /etc/dovecot/conf.d/20-imap.conf \ || ee_lib_error "Unable to setup Dovecot autocreate plugin, exit status = " $? diff --git a/src/modules/stack/remove/mail/ee_mod_remove_dovecot.sh b/src/modules/stack/remove/mail/ee_mod_remove_dovecot.sh index f3fcc9cf..199540f2 100644 --- a/src/modules/stack/remove/mail/ee_mod_remove_dovecot.sh +++ b/src/modules/stack/remove/mail/ee_mod_remove_dovecot.sh @@ -7,4 +7,6 @@ function ee_mod_remove_dovecot() || ee_lib_error "Unable to $EE_SECOND Dovecot, exit status = " $? userdel -rf vmail || ee_lib_error "Unable to Remove user vmail, exit status = " $? + rm -f /etc/init.d/dovecot + }