diff --git a/bin/update b/bin/update index 0dd1eccc..6616651f 100644 --- a/bin/update +++ b/bin/update @@ -441,6 +441,25 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then # Update EasyEngine current version EE_CURRENT_VERSION="2.1.0" fi + if [[ $EE_CURRENT_VERSION < 2.1.1 ]]; then + # Install WP-CLI + ee_ven_install_wpcli + + # Configure ManageSieve plugin + if [ -d /var/www/roundcubemail/htdocs ]; then + sed -i "/sieverules_port/d" /var/www/roundcubemail/htdocs/config/config.inc.php + sed -i "s/'sieverules'/'managesieve'/" /var/www/roundcubemail/htdocs/config/config.inc.php + + # Configure ManageSieve Plugin + cp -v /var/www/roundcubemail/htdocs/plugins/managesieve/config.inc.php.dist /var/www/roundcubemail/htdocs/plugins/managesieve/config.inc.php &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to configure ManageSieve Roundcube plugin, exit status = " $? + + sed -i "s:\$config\['managesieve_port'\] = null:\$config\['managesieve_port'\] = 4190:" /var/www/roundcubemail/htdocs/plugins/managesieve/config.inc.php && \ + sed -i "s:/etc/dovecot/sieve/global:/var/lib/dovecot/sieve/default.sieve:" /var/www/roundcubemail/htdocs/plugins/managesieve/config.inc.php \ + || ee_lib_error "Unable to configure ManageSieve Roundcube plugin, exit status = " $? + + fi + fi # Restart service ee_lib_service nginx php5-fpm restart