From 7d7c38410903f456e9ce32fb5fca7acc25d0b51f Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 16 Sep 2014 14:44:38 +0530 Subject: [PATCH] ee cd -> ee site cd --- bin/easyengine | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index 47699deb..8bb393b0 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -547,6 +547,21 @@ elif [ "$EE_FIRST" = "site" ]; then # tail -f log ee_mod_site_log ${@:3}|| ee_lib_error "Unable to check logs, exit status = " $? + #EasyEngine cd + elif [ "$EE_SECOND" = "cd" ]; then + # Check the website name is empty or not + EE_DOMAIN_CHECK=$EE_THIRD + ee_lib_check_domain + + #Check the website exist + ls /etc/nginx/sites-available/$EE_DOMAIN &> /dev/null \ + || ee_lib_error "The $EE_DOMAIN is not found in /etc/nginx/sites-available, exit status = " $? + + # Change Directory to $EE_DOMAIN webroot + if [ $? -eq 0 ]; then + ee_site_cd + fi + else ee_lib_echo "ee site commands:" ee_lib_echo_escape "\tlist\tList NGINX enabled website" @@ -669,21 +684,6 @@ elif [ "$EE_FIRST" = "secure" ]; then ee_lib_echo_escape "\t--ip\tUpdate whitelist IP address" fi -#EasyEngine cd -elif [ "$EE_FIRST" = "cd" ]; then - # Check the website name is empty or not - EE_DOMAIN_CHECK=$EE_SECOND - ee_lib_check_domain - - #Check the website exist - ls /etc/nginx/sites-available/$EE_DOMAIN &> /dev/null \ - || ee_lib_error "The $EE_DOMAIN is not found in /etc/nginx/sites-available, exit status = " $? - - # Change Directory to $EE_DOMAIN webroot - if [ $? -eq 0 ]; then - ee_site_cd - fi - # EasyEngine clean elif [ "$EE_FIRST" = "clean" ]; then ee_mod_cache_clean ${@:2} || ee_lib_error "Unable to clean cache = " $?