From 9083391cd96f692327590f489f366e2ec2af4b77 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 14 Jul 2014 11:15:00 +0530 Subject: [PATCH] Install required packages --- bin/update | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/update b/bin/update index 00ec8880..691aa03b 100644 --- a/bin/update +++ b/bin/update @@ -145,19 +145,6 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then if [[ $EE_CURRENT_VERSION < 2.0.0 ]]; then - # Install required packages - if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then - ee_lib_package_check graphviz python-software-properties software-properties-common - elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then - ee_lib_package_check graphviz python-software-properties - 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 ] || [ -n "$EE_PACKAGE_NAME" ]; then - ee_lib_echo "Installing required packages, please wait..." | tee -ai $EE_UPDATE_LOG - apt-get -y install coreutils ed bc wget curl tar git-core $EE_PACKAGE_NAME | tee -ai $EE_UPDATE_LOG\ - || ee_lib_error "Unable to install required packages, exit status = " $? - fi - # EasyEngine (ee) config file cp -av /etc/easyengine/ee.conf /etc/easyengine/ee.bak &>> $EE_UPDATE_LOG cp -av /tmp/easyengine/config/easyengine/ee.conf /etc/easyengine/ &>> $EE_UPDATE_LOG \ @@ -174,6 +161,19 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then # So all the logs write in $EE_UPDATE_LOG EE_COMMAND_LOG=$EE_UPDATE_LOG + # Install required packages + if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then + ee_lib_package_check graphviz python-software-properties software-properties-common + elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then + ee_lib_package_check graphviz python-software-properties + 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 ] || [ -n "$EE_PACKAGE_NAME" ]; then + ee_lib_echo "Installing required packages, please wait..." | tee -ai $EE_UPDATE_LOG + apt-get -y install coreutils ed bc wget curl tar git-core $EE_PACKAGE_NAME | tee -ai $EE_UPDATE_LOG\ + || ee_lib_error "Unable to install required packages, exit status = " $? + fi + # Get old value from ee.bak file ee_stack_ip=$(grep ip_address /etc/easyengine/ee.bak | cut -d'=' -f2) ee_mysql_host=$(grep mysqlhost /etc/easyengine/ee.bak | cut -d'=' -f2)