Browse Source

ee site create feature complete

old-stable
Mitesh Shah 11 years ago
parent
commit
5cd28888ff
  1. 6
      .travis.yml
  2. 41
      bin/easyengine
  3. 18
      bin/ee

6
.travis.yml

@ -34,6 +34,12 @@ script:
- sudo bash ee site create wpw3tc.com --w3tc
- sudo bash ee site create wpsubdirw3tc.com --wpsubdirectory --w3tc
- sudo bash ee site create wpsubdomainw3tc.com --w3tc --wpsubdom
- sudo bash ee site create wpwpsc.com --wpsc
- sudo bash ee site create wpsubdirwpsc.com --wpsubdirectory --wpsc
- sudo bash ee site create wpsubdomainwpsc.com --wpsc --wpsubdom
- sudo bash ee site create wpwpfc.com --wp --wpfc
- sudo bash ee site create wpsubdirwpfc.com --wpsubdirectory --wpfc
- sudo bash ee site create wpsubdomainwpfc.com --wpfc --wpsubdom
- sudo cat /var/log/easyengine/*

41
bin/easyengine

@ -271,7 +271,8 @@ elif [ "$EE_FIRST" = "site" ]; then
# Display Success Message
ee_lib_echo_info "Successfully Created New Website: http://$EE_WWW_DOMAIN"
elif [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then
if [ "$EE_SITE_CACHE_OPTION" = "--basic" ] || [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ]; then
if [ "$EE_SITE_CACHE_OPTION" = "--basic" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ] || [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then
# Configure variable
EE_NGINX_CONF=$(echo $EE_SITE_CREATE_OPTION | cut -c3-)/$(echo $EE_SITE_CACHE_OPTION | cut -c3-).conf
echo -e "EE_DOMAIN_CHECK = $EE_DOMAIN_CHECK \nEE_SITE_CREATE_OPTION = $EE_SITE_CREATE_OPTION \nEE_SITE_CACHE_OPTION = $EE_SITE_CACHE_OPTION \nEE_NETWORK_ACTIVATE = $EE_NETWORK_ACTIVATE \nEE_WP_SUBDOMAIN = $EE_WP_SUBDOMAIN \nEE_NGINX_CONF = $EE_NGINX_CONF" &>> $EE_COMMAND_LOG
@ -294,7 +295,11 @@ elif [ "$EE_FIRST" = "site" ]; then
# Install WordPress plugins
ee_mod_plugin_nginx_helper
if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ]; 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
@ -314,12 +319,32 @@ elif [ "$EE_FIRST" = "site" ]; then
echo
# Configure WordPress plugin settings
if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ]; then
ee_lib_echo_escape "Configure W3TC:\thttp://$EE_DOMAIN/wp-admin/admin.php?page=w3tc_general"
ee_lib_echo_escape "Page Cache:\tDisk Enhanced"
ee_lib_echo_escape "Database Cache:\tMemcache"
ee_lib_echo_escape "Object Cache:\tMemcache"
ee_lib_echo_escape "Browser Cache:\tDisable"
if [ "$EE_SITE_CACHE_OPTION" = "--wpsc" ]; then
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then
ee_lib_echo_escape "Configure WPSC:\t\thttp://$EE_DOMAIN/wp-admin/network/settings.php?page=wpsupercache"
else
ee_lib_echo_escape "Configure WPSC:\t\thttp://$EE_DOMAIN/wp-admin/options-general.php?page=wpsupercache"
fi
fi
if [ "$EE_SITE_CACHE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then
ee_lib_echo_escape "Configure W3TC:\t\thttp://$EE_DOMAIN/wp-admin/network/admin.php?page=w3tc_general"
else
ee_lib_echo_escape "Configure W3TC:\t\thttp://$EE_DOMAIN/wp-admin/admin.php?page=w3tc_general"
fi
ee_lib_echo_escape "Page Cache:\t\tDisk Enhanced"
ee_lib_echo_escape "Database Cache:\t\tMemcache"
ee_lib_echo_escape "Object Cache:\t\tMemcache"
ee_lib_echo_escape "Browser Cache:\t\tDisable"
fi
if [ "$EE_SITE_CACHE_OPTION" = "--wpfc" ]; then
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then
ee_lib_echo_escape "Configure nginx-helper:\thttp://$EE_DOMAIN/wp-admin/network/settings.php?page=nginx"
else
ee_lib_echo_escape "Configure nginx-helper:\thttp://$EE_DOMAIN/wp-admin/options-general.php?page=nginx"
fi
fi
# Display Success Message

18
bin/ee

@ -419,7 +419,7 @@ ee_mod_plugin_w3tc()
wp plugin --allow-root activate w3-total-cache $EE_NETWORK_ACTIVATE &>> $EE_COMMAND_LOG || ee_lib_error "Unable To Activate W3 Total Cache Plugin"
}
SUPERCACHENGINX()
ee_mod_plugin_wpsc()
{
# Installing WP Super Cache
cd /var/www/$EE_DOMAIN/htdocs/
@ -1190,9 +1190,9 @@ then
# Setup WordPress
ee_mod_setup_wordpress
ee_mod_plugin_nginx_helper
SUPERCACHENGINX
ee_mod_plugin_wpsc
# Adjust permission
ee_lib_permissions
ee_lib_permissions
# Git commit
ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options"
@ -1228,7 +1228,7 @@ then
ee_mod_plugin_nginx_helper
ee_mod_plugin_w3tc
# Adjust permission
ee_lib_permissions
ee_lib_permissions
# Git commit
ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options"
@ -1305,7 +1305,7 @@ then
SETUPWPNETWORK
ee_mod_plugin_w3tc
# Adjust permission
ee_lib_permissions
ee_lib_permissions
# Git commit
ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options"
@ -1344,9 +1344,9 @@ then
# Setup WordPress SubDirectory Network
SETUPWPNETWORK
SUPERCACHENGINX
ee_mod_plugin_wpsc
# Adjust permission
ee_lib_permissions
ee_lib_permissions
# Git commit
ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options"
@ -1387,7 +1387,7 @@ then
SETUPWPNETWORK
ee_mod_plugin_w3tc
# Adjust permission
ee_lib_permissions
ee_lib_permissions
# Git commit
ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options"
@ -1506,7 +1506,7 @@ then
# Setup WordPress SubDirectory Network
SETUPWPNETWORK
SUPERCACHENGINX
ee_mod_plugin_wpsc
# Adjust permission
ee_lib_permissions

Loading…
Cancel
Save