From 2d3ed50cc38e0eb199fab465541c95c8eb28269e Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Fri, 10 Oct 2014 14:28:32 +0530 Subject: [PATCH] Display HTTP Auth after site create, bug fix, easyengine version update --- bin/easyengine | 11 +++++++++++ src/lib/ee_lib_package_check.sh | 4 ++++ src/lib/ee_lib_stack_packages.sh | 2 ++ src/lib/ee_lib_variables.sh | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/bin/easyengine b/bin/easyengine index 2b7086fb..ffb6ed0d 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -427,6 +427,11 @@ elif [ "$EE_FIRST" = "site" ]; then # Git commit ee_lib_git /etc/nginx/ "$EE_DOMAIN created with $EE_SITE_CREATE_OPTION $EE_SITE_CACHE_OPTION options" + # Display Http Auth credentials + if [ "$EE_DISPLAY" = "true" ]; then + ee_lib_echo_info "HTTP Authentication username: easyengine" + ee_lib_echo_info "HTTP Authentication password: $(grep "HTTP Authentication password:" $EE_COMMAND_LOG | tail -n1 | awk '{print $4}')" + fi # 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 @@ -471,6 +476,12 @@ elif [ "$EE_FIRST" = "site" ]; then # Execute: service nginx reload ee_lib_service nginx reload + # Display Http Auth credentials + if [ "$EE_DISPLAY" = "true" ]; then + ee_lib_echo_info "HTTP Authentication username: easyengine" + ee_lib_echo_info "HTTP Authentication password: $(grep "HTTP Authentication password:" $EE_COMMAND_LOG | tail -n1 | awk '{print $4}')" + fi + # Display WordPress credential echo ee_lib_echo_info "WordPress Admin Username: $EE_WP_USER" diff --git a/src/lib/ee_lib_package_check.sh b/src/lib/ee_lib_package_check.sh index 0529e3a9..2ada9565 100644 --- a/src/lib/ee_lib_package_check.sh +++ b/src/lib/ee_lib_package_check.sh @@ -2,6 +2,10 @@ function ee_lib_package_check() { + # If nginx is not installed and php is installed + # ee site create example.com --wp is tries to installl php as $EE_PACKAGE_NAME=nginx-custom + EE_PACKAGE_NAME="" + local ee_package for ee_package in $@;do diff --git a/src/lib/ee_lib_stack_packages.sh b/src/lib/ee_lib_stack_packages.sh index 39d6eaa4..30017404 100644 --- a/src/lib/ee_lib_stack_packages.sh +++ b/src/lib/ee_lib_stack_packages.sh @@ -9,6 +9,8 @@ function ee_lib_stack_packages() if [ "$ee_stack_package" = "nginx" ]; then ee_lib_package_check $EE_NGINX_PACKAGE if [ "$EE_PACKAGE_NAME" != "" ]; then + # Export EE_DISPLAY variable to Display ee http auth after site creation. + export EE_DISPLAY=true # The following command creates its own sub-shell # and our ee_lib_error function only exit from that sub-shell # so we need to exit from parent shell also diff --git a/src/lib/ee_lib_variables.sh b/src/lib/ee_lib_variables.sh index cac25593..ebe20fce 100644 --- a/src/lib/ee_lib_variables.sh +++ b/src/lib/ee_lib_variables.sh @@ -1,7 +1,7 @@ # Define global variables # EasyEngine version -readonly EE_VERSION='2.1.0' +readonly EE_VERSION='2.2.0' # WP-CLI version readonly EE_WP_CLI_VERSION='0.17.0'