|
|
@ -664,6 +664,22 @@ 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 |
|
|
|
cd $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g') \ |
|
|
|
|| ee_lib_error "Unable to change directory for $EE_DOMAIN, exit status = " $? |
|
|
|
fi |
|
|
|
|
|
|
|
# EasyEngine update |
|
|
|
elif [ "$EE_FIRST" = "update" ]; then |
|
|
|
ee_lib_echo "Please set/use following alias to update EasyEngine (ee)" |
|
|
|