From b9342bee8720e519bf4e26164c9cd9a96c63b3c9 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Fri, 11 Jul 2014 18:37:04 +0530 Subject: [PATCH] fix #178 - ee secure --ip --- bin/easyengine | 3 ++- src/modules/stack/install/ee_mod_setup_nginx.sh | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index d09e0064..b772e0f6 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -571,13 +571,14 @@ elif [ "$EE_FIRST" = "debug" ]; then # EasyEngine secure elif [ "$EE_FIRST" = "secure" ]; then - if [ "$EE_SECOND" = "--auth" ] || [ "$EE_SECOND" = "--port" ]; then + if [ "$EE_SECOND" = "--auth" ] || [ "$EE_SECOND" = "--port" ] || [ "$EE_SECOND" = "--ip" ]; then ee_mod_secure_$(echo $EE_SECOND | sed 's/--//') ee_lib_service nginx reload else ee_lib_echo "ee secure commands:" ee_lib_echo_escape "\t--auth\tUpdate credential of HTTP authentication" ee_lib_echo_escape "\t--port\tChange EasyEngine admin port 22222" + ee_lib_echo_escape "\t--ip\tUpdate whitelist IP address" fi # EasyEngine update diff --git a/src/modules/stack/install/ee_mod_setup_nginx.sh b/src/modules/stack/install/ee_mod_setup_nginx.sh index ba8dbc3b..a439f4ef 100644 --- a/src/modules/stack/install/ee_mod_setup_nginx.sh +++ b/src/modules/stack/install/ee_mod_setup_nginx.sh @@ -90,9 +90,8 @@ function ee_mod_setup_nginx() # White list IP address if [ -n "$EE_IP_ADDRESS" ]; then - for ee_whitelist_ip_address in $(echo $EE_IP_ADDRESS) - do - sed -i "/deny/i $(echo allow $ee_whitelist_ip_address\;)" /etc/nginx/common/acl.conf + for ee_whitelist_ip_address in $(echo $EE_IP_ADDRESS);do + sed -i "/deny/i $(echo allow $ee_whitelist_ip_address\;)" /etc/nginx/common/acl.conf done fi