diff --git a/install.sh b/install.sh index d4bdbdb5..c51a6610 100644 --- a/install.sh +++ b/install.sh @@ -30,48 +30,48 @@ INSTALLLOG=/var/log/easyengine/install.log # Checking Logs Directory if [ ! -d $LOGDIR ] then - echo -e "\033[34m Creating easyengine log directory... \e[0m" - mkdir -p $LOGDIR || OwnError "Unable to create log directory $LOGDIR" + echo -e "\033[34m Creating Easy Engine Log Directory... \e[0m" + mkdir -p $LOGDIR || OwnError "Unable To Create Log Directory $LOGDIR" fi # Checking Tee if [ ! -x /usr/bin/tee ] then - echo -e "\033[31m Tee command not found !! \e[0m" - echo -e "\033[34m Installing tee \e[0m" + echo -e "\033[31m Tee Command Not Found !! \e[0m" + echo -e "\033[34m Installing Tee \e[0m" sudo apt-get -y install coreutils || OwnError "Unable to install tee" fi # Checking Wget if [ ! -x /usr/bin/wget ] then - echo -e "\033[31m Wget command not found !! \e[0m" - echo -e "\033[34m Installing wget \e[0m" - sudo apt-get -y install wget || OwnError "Unable to install wget" + echo -e "\033[31m Wget Command Not Found !! \e[0m" + echo -e "\033[34m Installing Wget \e[0m" + sudo apt-get -y install wget || OwnError "Unable To Install Wget" fi # Checking Tar if [ ! -x /bin/tar ] then - echo -e "\033[31m Tar command not found !! \e[0m" - echo -e "\033[34m Installing tar \e[0m" - sudo apt-get -y install tar || OwnError "Unable to install tar" + echo -e "\033[31m Tar Command Not Found !! \e[0m" + echo -e "\033[34m Installing Tar \e[0m" + sudo apt-get -y install tar || OwnError "Unable To Install Tar" fi # Checking Name Servers if [[ -z $(cat /etc/resolv.conf | grep -v ^#) ]] then - echo -e "\033[31m No nameservers detected !! \e[0m" | tee -ai $INSTALLLOG - echo -e "\033[31m Please configure /etc/resolv.conf \e[0m" | tee -ai $INSTALLLOG - exit 100 + echo -e "\033[31m No Name Servers Detected !! \e[0m" | tee -ai $INSTALLLOG + echo -e "\033[31m Please Configure /etc/resolv.conf \e[0m" | tee -ai $INSTALLLOG + exit 102 fi # Checking Git if [ ! -x /usr/bin/git ] then - echo -e "\033[31m Git command not found !! \e[0m" - echo -e "\033[34m Installing git \e[0m" - sudo apt-get -y install git-core || OwnError "Unable to install git" + echo -e "\033[31m Git Command Not Found !! \e[0m" + echo -e "\033[34m Installing Git \e[0m" + sudo apt-get -y install git-core || OwnError "Unable To Install Git" fi # Pre Checks End @@ -81,14 +81,14 @@ fi EXIST=$(basename `pwd`) if [ "$EXIST" != "easyengine" ] then - echo -e "\033[34m Cloning Easy Engine, please wait... \e[0m" | tee -ai $INSTALLLOG + echo -e "\033[34m Cloning Easy Engine, Please Wait... \e[0m" | tee -ai $INSTALLLOG cd /tmp # Remove Older Easy Engine If Found rm -rf /tmp/easyengine # Git Clone - git clone git://github.com/rtCamp/easyengine.git || OwnError "Unable to clone easy engine" + git clone git://github.com/rtCamp/easyengine.git || OwnError "Unable To Clone Easy Engine" cd easyengine fi @@ -96,13 +96,14 @@ fi if [ ! -d /usr/share/easyengine ] then mkdir -p /usr/share/easyengine \ - || OwnError "Unable to create dir /usr/share/easyengine" + || OwnError "Unable To Create Dir /usr/share/easyengine" fi # Install Easy Engine -echo -e "\033[34m Installing Easy Engine, please wait... \e[0m" | tee -ai $INSTALLLOG -cp -a conf/* /usr/share/easyengine -cp -a setup/engine /usr/local/sbin/ +echo -e "\033[34m Installing Easy Engine, Please Wait... \e[0m" | tee -ai $INSTALLLOG +cp -a conf/* /usr/share/easyengine || OwnError "Unable To Copy Configuration Files " +cp -a setup/engine /usr/local/sbin/ || OwnError "Unable To Copy Engine Command" +chmod 750 /usr/local/sbin/engine || OwnError "Unable To Change Engine Coommand Permission" # Create Symbolic Link If Not Exist if [ ! -L /usr/local/sbin/ee ] @@ -114,7 +115,6 @@ fi - echo echo -e "\033[34m Easy Engine Installed Successfully \e[0m" | tee -ai $INSTALLLOG echo