Browse Source

Create EasyEngine function to log all messages

old-stable
Mitesh Shah 11 years ago
parent
commit
672c26157f
  1. 10
      bin/easyengine
  2. 2
      src/modules/system/install/ee_mod_install_mysql.sh
  3. 2
      src/modules/system/install/ee_mod_install_nginx.sh
  4. 2
      src/modules/system/install/ee_mod_install_php.sh
  5. 2
      src/modules/system/install/ee_mod_install_postfix.sh

10
bin/easyengine

@ -12,13 +12,15 @@ for ee_include in $(find /usr/local/lib/easyengine/ -iname "*.sh"); do
source $ee_include
done
# Main EasyEngine (ee) function to log all the outputs
EasyEngine()
{
# Let's capture the EasyEngine arguments
ee_lib_echo "EasyEngine (ee) execution started [$(date)]" &>> $EE_COMMAND_LOG
ee_lib_echo "EasyEngine (ee) command: $0 $@" &>> $EE_COMMAND_LOG
# EasyEngine version
if [ "$EE_FIRST" = "version" ] || [ "$EE_FIRST" = "--version" ] || [ "$EE_FIRST" = "-v" ];then
# Display Easy Engine Version
@ -173,3 +175,7 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
ee_lib_service nginx php5-fpm mysql postfix $EE_SECOND
fi
fi
}
EasyEngine | tee -ai $EE_COMMAND_LOG

2
src/modules/system/install/ee_mod_install_mysql.sh

@ -20,7 +20,7 @@ ee_mod_install_mysql()
fi
ee_lib_echo "Installing MySQL, please Wait..."
$EE_APT_GET install mysql-server mysqltuner percona-toolkit | tee -ai $EE_COMMAND_LOG \
$EE_APT_GET install mysql-server mysqltuner percona-toolkit \
|| ee_lib_error "Unable to install MySQL, exit status = " $?
# Download tuning-primer.sh

2
src/modules/system/install/ee_mod_install_nginx.sh

@ -3,6 +3,6 @@
function ee_mod_install_nginx()
{
ee_lib_echo "Installing $EE_NGINX_PACKAGE, please wait..."
$EE_APT_GET install $EE_NGINX_PACKAGE | tee -ai $EE_COMMAND_LOG \
$EE_APT_GET install $EE_NGINX_PACKAGE \
|| ee_lib_error "Unable to install $EE_NGINX_PACKAGE, exit status = " $?
}

2
src/modules/system/install/ee_mod_install_php.sh

@ -5,5 +5,5 @@ function ee_mod_install_php()
ee_lib_echo "Installing PHP, please wait..."
$EE_APT_GET install php5-common php5-mysqlnd php5-xmlrpc \
php5-curl php5-gd php5-cli php5-fpm php5-imap php5-mcrypt php5-xdebug \
php5-memcache memcached | tee -ai $EE_COMMAND_LOG || ee_lib_error "Unable to install PHP5, exit status = " $?
php5-memcache memcached || ee_lib_error "Unable to install PHP5, exit status = " $?
}

2
src/modules/system/install/ee_mod_install_postfix.sh

@ -8,5 +8,5 @@ function ee_mod_install_postfix()
# Install Postfix
ee_lib_echo "Installing Postfix, please wait..."
$EE_APT_GET install postfix | tee -ai EE_COMMAND_LOG || ee_lib_error "Unable to install Postfix, exit status = " $?
$EE_APT_GET install postfix || ee_lib_error "Unable to install Postfix, exit status = " $?
}

Loading…
Cancel
Save