Mitesh Shah
10 years ago
5 changed files with 77 additions and 50 deletions
@ -0,0 +1,21 @@ |
|||
# Install required packages |
|||
|
|||
if [ "$EE_SITE_CREATE_OPTION" = "--html" ] || [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
|||
# Check & Install NGINX Packages |
|||
ee_lib_stack_packages nginx |
|||
fi |
|||
if [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
|||
# Check & Install PHP Packages |
|||
ee_lib_stack_packages php |
|||
fi |
|||
if [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
|||
# Check & Install Percona MySQL Packages |
|||
ee_lib_stack_packages mysql |
|||
fi |
|||
|
|||
if [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
|||
# Install WP-CLI |
|||
ee_ven_install_wpcli |
|||
fi |
|||
# Check & Install Postfix Packages |
|||
ee_lib_stack_packages postfix |
@ -0,0 +1,30 @@ |
|||
# Update cache plugins |
|||
|
|||
function ee_mod_update_plugins() |
|||
{ |
|||
cd /var/www/$EE_DOMAIN/htdocs/ |
|||
|
|||
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" ]; 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 |
|||
ee_lib_echo "Unnstalling WP Super Cache plugin, please wait..." |
|||
wp plugin --allow-root uninstall wp-super-cache &>> $EE_COMMAND_LOG |
|||
fi |
|||
|
|||
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 |
|||
fi |
|||
|
|||
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_mod_plugin_w3tc |
|||
fi |
|||
} |
Loading…
Reference in new issue