From 225b06a76045711cdeba97338ef4c2d18a79196e Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 23 Sep 2013 13:04:51 +0530 Subject: [PATCH] Move ee site info to ee system info --- etc/bash_completion.d/ee | 2 +- usr/local/sbin/easyengine | 41 ++++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/etc/bash_completion.d/ee b/etc/bash_completion.d/ee index 0e6a34f9..4d9c7230 100644 --- a/etc/bash_completion.d/ee +++ b/etc/bash_completion.d/ee @@ -23,7 +23,7 @@ EEAUTO() ;; system) - COMPREPLY=( $( compgen -W "install remove purge config" -- $CURRENT ) ) + COMPREPLY=( $( compgen -W "install remove purge info config" -- $CURRENT ) ) return 0 ;; diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 8567bf1a..cf800f27 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -476,7 +476,7 @@ PHPUSERINFO() || OwnError "Unable To Findout PHP Username" } -SERVERINFO() +SYSTEMINFO() { # Nginx Information NGINXVER=$(nginx -v 2>&1 | cut -d':' -f2 | cut -d' ' -f2) @@ -1206,6 +1206,16 @@ then fi + # Easy Engine Info + elif [ "$2" = "info" ] + then + + # Get Nginx PHP & MySQL Information + SYSTEMINFO + + fi + + # Easy Engine Config elif [ "$2" = "config" ] then @@ -1274,28 +1284,19 @@ then elif [ "$2" = "info" ] then - # Server Information - SERVERINFO - # Check SITENAME Is Empty Or Not - if [ ! -z "$3" ] - then - - SITENAMECHECK=$3 - EESITENAME + SITENAMECHECK=$3 + EESITENAME - # Check The Website Is Exist - ls /etc/nginx/sites-available/$DOMAIN &> /dev/null \ - || OwnError "The $DOMAIN Is Not Found In Available Websites List" - - if [ $? -eq 0 ] - then + # Check The Website Enabled + ls /etc/nginx/sites-enabled/$DOMAIN &> /dev/null \ + || OwnError "The $DOMAIN Is Not Enabled" - # Display The Various Information About $DOMAIN - echo -e "\033[34m Display The Various Information About $DOMAIN \e[0m" - echo -e "\033[34m Under Developments \e[0m" - - fi + if [ $? -eq 0 ] + then + # Display The Various Information About $DOMAIN + echo -e "\033[34m Display The Various Information About $DOMAIN \e[0m" + echo -e "\033[34m Under Developments \e[0m" fi