From 266a721bc750c6829b526bd45341dfd43dda3b8e Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Mon, 20 Oct 2014 17:07:02 +0530 Subject: [PATCH] minor update --- bin/easyengine | 2 +- .../site/update/ee_mod_update_plugins.sh | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index f9dbd74c..764fee95 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -632,7 +632,7 @@ elif [ "$EE_FIRST" = "site" ]; then if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then ee_mod_setup_network fi - + # Let's Update cache plugins if [[ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE BASIC" && "$EE_SITE_CACHE_OPTION" != "--basic" ]]; then if [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then ee_mod_plugin_wpsc diff --git a/src/modules/site/update/ee_mod_update_plugins.sh b/src/modules/site/update/ee_mod_update_plugins.sh index b50df163..8a7ce7f0 100644 --- a/src/modules/site/update/ee_mod_update_plugins.sh +++ b/src/modules/site/update/ee_mod_update_plugins.sh @@ -4,28 +4,35 @@ function ee_mod_update_plugins() { cd /var/www/$EE_DOMAIN/htdocs/ + # Uninstall W3TC plugin in case converting site to --basic | --wpsc if [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE W3 TOTAL CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE FAST CGI" ] \ || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDIR W3 TOTAL CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDIR FAST CGI" ] \ - || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN W3 TOTAL CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN FAST CGI" ] && [[ "$EE_SITE_CACHE_OPTION" = "--basic" || "$EE_SITE_CACHE_OPTION" = "--wpsc" ]]; then + || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN W3 TOTAL CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN FAST CGI" ] \ + && [[ "$EE_SITE_CACHE_OPTION" = "--basic" || "$EE_SITE_CACHE_OPTION" = "--wpsc" ]]; then ee_lib_echo "Uninstalling W3 Total Cache plugin, please wait..." wp plugin --allow-root uninstall w3-total-cache &>> $EE_COMMAND_LOG fi - - if [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN WP SUPER CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE WP SUPER CACHE" ] \ - || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDIR WP SUPER CACHE" ] && [ "$EE_SITE_CACHE_OPTION" = "--basic" ]; then + # Uninstall WPSC plugin in case converting site to --basic | --w3tc | --wpfc + if [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE WP SUPER CACHE" ] || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDIR WP SUPER CACHE" ] \ + || [ "$EE_SITE_CURRENT_OPTION" = "WPSUBDOMAIN WP SUPER CACHE" ] && [ "$EE_SITE_CACHE_OPTION" = "--basic" ]; then ee_lib_echo "Unistalling WP Super Cache plugin, please wait..." wp plugin --allow-root uninstall wp-super-cache &>> $EE_COMMAND_LOG fi + # Install wpsc plugin in case updating site to --wpsc if [ "$EE_SITE_CURRENT_OPTION" != "WPSINGLE WP SUPER CACHE" ] && [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDIR WP SUPER CACHE" ] \ && [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDOMAIN WP SUPER CACHE" ] && [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then ee_mod_plugin_wpsc + ee_mod_plugin_settings fi + # Install w3tc plugin in case updating site to --w3tc | --wpfc if [ "$EE_SITE_CURRENT_OPTION" != "WPSINGLE W3 TOTAL CACHE" ] && [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDIR W3 TOTAL CACHE" ] \ - || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDOMAIN W3 TOTAL CACHE" ] && [ "$EE_SITE_CURRENT_OPTION" != "WPSINGLE FAST CGI" ] || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDIR FAST CGI" ] \ - || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDOMAIN FAST CGI" ] && [[ "$EE_SITE_CACHE_OPTION" = "--wpfc" || "$EE_SITE_CACHE_OPTION" = "--w3tc" ]]; then + || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDOMAIN W3 TOTAL CACHE" ] && [ "$EE_SITE_CURRENT_OPTION" != "WPSINGLE FAST CGI" ] \ + || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDIR FAST CGI" ] || [ "$EE_SITE_CURRENT_OPTION" != "WPSUBDOMAIN FAST CGI" ] \ + && [[ "$EE_SITE_CACHE_OPTION" = "--w3tc" || "$EE_SITE_CACHE_OPTION" = "--wpfc" ]]; then ee_mod_plugin_w3tc + ee_mod_plugin_settings fi }