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 + }