diff --git a/bin/easyengine b/bin/easyengine index e13aa12f..e1a4a0f1 100644 --- a/bin/easyengine +++ b/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 diff --git a/src/modules/system/install/ee_mod_install_mysql.sh b/src/modules/system/install/ee_mod_install_mysql.sh index 33a4ea8c..f6c81f08 100644 --- a/src/modules/system/install/ee_mod_install_mysql.sh +++ b/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 diff --git a/src/modules/system/install/ee_mod_install_nginx.sh b/src/modules/system/install/ee_mod_install_nginx.sh index 485f94bf..b7c7c5c8 100644 --- a/src/modules/system/install/ee_mod_install_nginx.sh +++ b/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 = " $? } diff --git a/src/modules/system/install/ee_mod_install_php.sh b/src/modules/system/install/ee_mod_install_php.sh index 12c95d2e..57b36c96 100644 --- a/src/modules/system/install/ee_mod_install_php.sh +++ b/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 = " $? } diff --git a/src/modules/system/install/ee_mod_install_postfix.sh b/src/modules/system/install/ee_mod_install_postfix.sh index 0bf00e4e..4a1571c1 100644 --- a/src/modules/system/install/ee_mod_install_postfix.sh +++ b/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 = " $? }