Browse Source

Fix HTTP AUTH message display

old-stable
Mitesh Shah 10 years ago
parent
commit
7b37425ba6
  1. 6
      bin/easyengine
  2. 2
      src/lib/ee_lib_stack_packages.sh
  3. 4
      src/modules/stack/install/ee_mod_setup_nginx.sh

6
bin/easyengine

@ -214,7 +214,7 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
# Display HTTP authentication details
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "" ] || [ "$EE_THIRD" = "web" ] || [ "$EE_THIRD" = "all" ]; then
if [ "$EE_DISPLAY" != "true" ]; then
if [ "$EE_DISPLAY" = "true" ]; then
ee_lib_echo_info "HTTP authentication username: $EE_HTTP_AUTH_USER"
ee_lib_echo_info "HTTP authentication password: $EE_HTTP_AUTH_PASS"
fi
@ -436,7 +436,7 @@ elif [ "$EE_FIRST" = "site" ]; then
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
if [ "$EE_DISPLAY" = "false" ]; 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
@ -485,7 +485,7 @@ elif [ "$EE_FIRST" = "site" ]; then
ee_lib_service nginx reload
# Display Http Auth credentials
if [ "$EE_DISPLAY" = "true" ]; then
if [ "$EE_DISPLAY" = "false" ]; 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

2
src/lib/ee_lib_stack_packages.sh

@ -10,7 +10,7 @@ function ee_lib_stack_packages()
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
export EE_DISPLAY=false
# 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

4
src/modules/stack/install/ee_mod_setup_nginx.sh

@ -99,7 +99,9 @@ function ee_mod_setup_nginx()
# Generate htpasswd-ee file
if [ ! -f /etc/nginx/htpasswd-ee ]; then
# Export EE_DISPLAY variable to Display ee http auth after site creation.
export EE_DISPLAY=true
if [ -z $EE_DISPLAY ]; then
export EE_DISPLAY=true
fi
# Use same variable name as used in ee_mod_secure_auth function
EE_HTTP_AUTH_USER=easyengine
EE_HTTP_AUTH_PASS=$ee_random

Loading…
Cancel
Save