|
|
@ -556,11 +556,21 @@ elif [ "$EE_FIRST" = "site" ]; then |
|
|
|
EE_SITE_TYPE="--php" |
|
|
|
elif [ "$EE_SITE_CURRENT_OPTION" = "MYSQL" ]; then |
|
|
|
EE_SITE_TYPE="--mysql" |
|
|
|
elif [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE BASIC" ]; then |
|
|
|
EE_SITE_TYPE="--wp --basic" |
|
|
|
elif [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE WP SUPER CACHE" ]; then |
|
|
|
EE_SITE_TYPE="--wp --wpsc" |
|
|
|
elif [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE W3 TOTAL CACHE" ]; then |
|
|
|
EE_SITE_TYPE="--wp --w3tc" |
|
|
|
elif [ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE FAST CGI" ]; then |
|
|
|
EE_SITE_TYPE="--wp --wpfc" |
|
|
|
fi |
|
|
|
|
|
|
|
# Let's log site current option |
|
|
|
ee_lib_echo_escape "EE_SITE_TYPE = $EE_SITE_TYPE \nEE_SITE_UPDATE_OPTION = $EE_SITE_CREATE_OPTION \nEE_SITE_CACHE_OPTION = $EE_SITE_CACHE_OPTION" &>> $EE_COMMAND_LOG |
|
|
|
|
|
|
|
# Lets update HTML|PHP website |
|
|
|
#if [ "$EE_SITE_CURRENT_OPTION" = "HTML" ] || [ "$EE_SITE_CURRENT_OPTION" = "PHP" ]; then |
|
|
|
if [[ "$EE_SITE_CURRENT_OPTION" = "HTML" && "$EE_SITE_CREATE_OPTION" != "--html" ]] || [[ "$EE_SITE_CURRENT_OPTION" = "PHP" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" ]]; then |
|
|
|
if [[ "$EE_SITE_TYPE" = "--html" && "$EE_SITE_CREATE_OPTION" != "--html" ]] || [[ "$EE_SITE_TYPE" = "--php" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" ]]; then |
|
|
|
# Let's take backup first |
|
|
|
ee_mod_site_backup |
|
|
|
|
|
|
@ -593,8 +603,8 @@ elif [ "$EE_FIRST" = "site" ]; then |
|
|
|
# Display WordPress cache plugin settings |
|
|
|
ee_mod_plugin_settings |
|
|
|
fi |
|
|
|
# if [ "$EE_SITE_CURRENT_OPTION" = "MYSQL" ] |
|
|
|
elif [[ "$EE_SITE_CURRENT_OPTION" = "MYSQL" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" && "$EE_SITE_CREATE_OPTION" != "--mysql" ]]; then |
|
|
|
|
|
|
|
elif [[ "$EE_SITE_TYPE" = "--mysql" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" && "$EE_SITE_CREATE_OPTION" != "--mysql" ]]; then |
|
|
|
# Let's take backup first |
|
|
|
ee_mod_site_backup |
|
|
|
|
|
|
@ -620,11 +630,15 @@ elif [ "$EE_FIRST" = "site" ]; then |
|
|
|
|
|
|
|
# Display WordPress cache plugin settings |
|
|
|
ee_mod_plugin_settings |
|
|
|
elif [[ "$EE_SITE_CURRENT_OPTION" = "WPSINGLE BASIC" || "$EE_SITE_CURRENT_OPTION" = "WPSINGLE WP SUPER CACHE" || "$EE_SITE_CURRENT_OPTION" = "WPSINGLE W3 TOTAL CACHE" || "$EE_SITE_CURRENT_OPTION" = "WPSINGLE FAST CGI" ]] \ |
|
|
|
&& [[ "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" && "$EE_SITE_CREATE_OPTION" != "--mysql" ]]; then |
|
|
|
|
|
|
|
elif [[ "$EE_SITE_TYPE" = "--wp --basic" || "$EE_SITE_TYPE" = "--wp --wpsc" || "$EE_SITE_TYPE" = "--wp --w3tc" || "$EE_SITE_TYPE" = "--wp --wpfc" ]] \ |
|
|
|
&& [[ "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" && "$EE_SITE_CREATE_OPTION" != "--mysql" ]]; then |
|
|
|
# Let's take backup first |
|
|
|
ee_mod_site_backup |
|
|
|
|
|
|
|
# Install required packages |
|
|
|
ee_mod_site_packages |
|
|
|
|
|
|
|
# Let's start update |
|
|
|
ee_mod_update_nginx |
|
|
|
|
|
|
@ -632,18 +646,20 @@ 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 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then |
|
|
|
ee_mod_plugin_w3tc |
|
|
|
fi |
|
|
|
else |
|
|
|
ee_mod_update_plugins |
|
|
|
# Install WordPress plugins |
|
|
|
ee_mod_plugin_nginx_helper |
|
|
|
|
|
|
|
if [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then |
|
|
|
ee_mod_plugin_wpsc |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then |
|
|
|
ee_mod_plugin_w3tc |
|
|
|
fi |
|
|
|
|
|
|
|
# Display WordPress cache plugin settings |
|
|
|
ee_mod_plugin_settings |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|