Browse Source

Install Required Package During EasyEngine Installation

old-stable
Mitesh Shah 11 years ago
parent
commit
ea48317dbd
  1. 18
      install.sh
  2. 8
      usr/local/sbin/easyengine

18
install.sh

@ -18,6 +18,18 @@ function ECHO_WHITE ()
echo $(tput setaf 7)$@$(tput sgr0)
}
function PACKAGE_CHECK ()
{
# Check the specified package is instlled or not
for i in $@;do
dpkg --get-selections | grep -v deinstall | grep $i &>> INSTALL_LOG
# Generate a list of not installed package
if [ $? -ne 0 ]; then
PACKAGE_NAME="$PACKAGE_NAME $i"
fi
done
}
# Update apt cache
ECHO_BLUE "Updating apt cache, please wait..."
apt-get update &>> /dev/null
@ -61,9 +73,11 @@ if [ ! -d $LOG_DIR ]; then
mkdir -p $LOG_DIR || EE_ERROR "Unable to create log directory $LOG_DIR"
fi
if [ ! -x /usr/bin/tee ] || [ ! -x /bin/ed ] || [ ! -x /usr/bin/bc ] || [ ! -x /usr/bin/wget ] || [ ! -x /usr/bin/curl ] || [ ! -x /bin/tar ] || [ ! -x /usr/bin/git ]; then
# Install required packages
PACKAGE_CHECK graphviz
if [ ! -x /usr/bin/tee ] || [ ! -x /bin/ed ] || [ ! -x /usr/bin/bc ] || [ ! -x /usr/bin/wget ] || [ ! -x /usr/bin/curl ] || [ ! -x /bin/tar ] || [ ! -x /usr/bin/git ] || [ -n $PACKAGE_NAME ]; then
ECHO_BLUE "Installing required packages" | tee -ai $INSTALL_LOG
apt-get -y install coreutils ed bc wget curl tar git-core || EE_ERROR "Unable to install required packages"
apt-get -y install coreutils ed bc wget curl tar git-core $PACKAGE_NAME || EE_ERROR "Unable to install required packages"
fi
# Checking name servers

8
usr/local/sbin/easyengine

@ -496,14 +496,6 @@ PHP_PACKAGES()
echo -e "\033[34mCloning Webgrind, Please Wait...\e[0m"
git clone https://github.com/jokkedk/webgrind.git /var/www/22222/htdocs/php/webgrind/ &>> $INSTALLLOG || OwnError "Unable To Clone Webgrind"
sed -i "s'/usr/local/bin/dot'/usr/bin/dot'" /var/www/22222/htdocs/php/webgrind/config.php
# Install Graphviz
dpkg -l | grep graphviz &>> $INSTALLLOG
if [ $? -ne 0 ]
then
echo -e "\033[34mInstalling Graphviz, Please Wait...\e[0m"
apt-get -y install graphviz || OwnError "Unable To Install Graphviz"
fi
fi
# Create info.php File To Display The phpinfo Information

Loading…
Cancel
Save