Browse Source

Minor fix and echo values

bugfixes
Mitesh Shah 10 years ago
parent
commit
859122c033
  1. 15
      .travis.yml
  2. 12
      bin/easyengine
  3. 3
      src/modules/site/update/ee_mod_update_nginx.sh

15
.travis.yml

@ -133,21 +133,6 @@ script:
- sudo bash ee site update 1.com --wp
- sudo bash ee site update 2.com --wpsubdir
- sudo bash ee site update 3.com --wpsubdomain
- sudo bash ee site update site1.com --wp --wpfc
- sudo bash ee site update site1.com --wp --w3tc
- sudo bash ee site update site1.com --wp --wpsc
- sudo bash ee site update site5.com --wpsubdir --wpfc
- sudo bash ee site update site5.com --wpsubdir --w3tc
- sudo bash ee site update site5.com --wpsubdir --wpsc
- sudo bash ee site update site9.com --wpsubdom --wpfc
- sudo bash ee site update site9.com --wpsubdom --w3tc
- sudo bash ee site update site9.com --wpsubdom --wpsc
- sudo ee site delete site12.com --no-prompt
- sudo ee site delete site12.net --no-prompt

12
bin/easyengine

@ -549,6 +549,13 @@ elif [ "$EE_FIRST" = "site" ]; then
# Find out information about current NGINX configuration
EE_SITE_CURRENT_OPTION=$(head -n1 /etc/nginx/sites-available/$EE_DOMAIN | grep "NGINX CONFIGURATION" | rev | cut -d' ' -f3,4,5,6,7 | rev | cut -d ' ' -f2,3,4,5)
# Detect current website type and cache
if [ "$EE_SITE_CURRENT_OPTION" = "HTML" ]; then
EE_SITE_TYPE="--html"
elif [ "$EE_SITE_CURRENT_OPTION" = "PHP" ]; then
EE_SITE_TYPE="--php"
fi
# 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
@ -580,6 +587,7 @@ elif [ "$EE_FIRST" = "site" ]; then
fi
fi
if [ "$EE_SITE_TYPE" != "$EE_SITE_CREATE_OPTION" ]; then
# Adjust permission
ee_lib_permissions
@ -591,6 +599,10 @@ elif [ "$EE_FIRST" = "site" ]; then
# Display Success Message
ee_lib_echo_info "Successfully Updated Website: http://$EE_WWW_DOMAIN"
else
ee_lib_error "Invalid option, exit status = " $?
fi
elif [ "$EE_SECOND" = "log" ]; then
# Display logs for websites
ee_mod_site_log ${@:3}

3
src/modules/site/update/ee_mod_update_nginx.sh

@ -23,6 +23,9 @@ function ee_mod_update_nginx()
fi
ee_nginx_update_header=$(head -n1 /usr/share/easyengine/nginx/$ee_nginx_conf | grep "NGINX CONFIGURATION")
# Echo values
echo -e "EE_DOMAIN_CHECK = $EE_DOMAIN_CHECK \nEE_SITE_UPDATE_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
# Update Head Line of NGINX conf
sed -i "s'$ee_nginx_current_header'$ee_nginx_update_header'" /etc/nginx/sites-available/$EE_DOMAIN || ee_lib_error "Unable to update nginx configuration to $EE_SITE_UPDATE_OPTION, $EE_SITE_CACHE_OPTION for $EE_DOMAIN, exit status =" $?

Loading…
Cancel
Save