From 04003ab474f83801d53c53ac424f7d8adcfc0dbe Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Tue, 17 Jun 2014 18:21:02 +0530 Subject: [PATCH] Function for w3tc wpsc and nginx-helper plugin --- .../site/create/ee_mod_plugin_nginx_helper.sh | 13 +++++++++++++ src/modules/site/create/ee_mod_plugin_w3tc.sh | 13 +++++++++++++ src/modules/site/create/ee_mod_plugin_wpsc.sh | 13 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/modules/site/create/ee_mod_plugin_nginx_helper.sh create mode 100644 src/modules/site/create/ee_mod_plugin_w3tc.sh create mode 100644 src/modules/site/create/ee_mod_plugin_wpsc.sh diff --git a/src/modules/site/create/ee_mod_plugin_nginx_helper.sh b/src/modules/site/create/ee_mod_plugin_nginx_helper.sh new file mode 100644 index 00000000..f0839e17 --- /dev/null +++ b/src/modules/site/create/ee_mod_plugin_nginx_helper.sh @@ -0,0 +1,13 @@ +# Setup NGINX Helper + +function ee_mod_plugin_nginx_helper() +{ + cd /var/www/$EE_DOMAIN/htdocs/ + ee_lib_echo "Installing Nginx Helper plugin, please wait..." + wp plugin --allow-root install nginx-helper &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to install Nginx Helper plugin, exit status = " $? + + # Activate Nginx Helper + wp plugin --allow-root activate nginx-helper $EE_NETWORK_ACTIVATE &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to activate Nginx Helper plugin, exit status = " $? +} diff --git a/src/modules/site/create/ee_mod_plugin_w3tc.sh b/src/modules/site/create/ee_mod_plugin_w3tc.sh new file mode 100644 index 00000000..af10ead9 --- /dev/null +++ b/src/modules/site/create/ee_mod_plugin_w3tc.sh @@ -0,0 +1,13 @@ +# Setup W3 Total Cache + +function ee_mod_plugin_w3tc() +{ + cd /var/www/$EE_DOMAIN/htdocs/ + ee_lib_echo "Installing W3 Total Cache plugin, please wait..." + wp plugin --allow-root install w3-total-cache &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to install W3 Total Cache plugin, exit status = " $? + + # Activate W3 Total Cache + wp plugin --allow-root activate w3-total-cache $EE_NETWORK_ACTIVATE &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to activate W3 Total Cache plugin, exit status = " $? +} diff --git a/src/modules/site/create/ee_mod_plugin_wpsc.sh b/src/modules/site/create/ee_mod_plugin_wpsc.sh new file mode 100644 index 00000000..d1e38618 --- /dev/null +++ b/src/modules/site/create/ee_mod_plugin_wpsc.sh @@ -0,0 +1,13 @@ +# Setup WP Super Cache + +function ee_mod_plugin_wpsc() +{ + cd /var/www/$EE_DOMAIN/htdocs/ + ee_lib_echo "Installing WP Super Cache plugin, please wait..." + wp plugin --allow-root install wp-super-cache &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to install WP Super Cache plugin, exit status = " $? + + # Activate WP Super Cache + wp plugin --allow-root activate wp-super-cache $EE_NETWORK_ACTIVATE &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to activate WP Super Cache plugin, exit status = " $? +}