Browse Source

Fix Permission & Litle Stuff

old-stable
Mitesh Shah 12 years ago
parent
commit
3774fcbd19
  1. 46
      install.sh

46
install.sh

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

Loading…
Cancel
Save