From 0fb5781ac28577e863a9f7d28e585bcfd7515de4 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Fri, 6 Jun 2014 17:40:31 +0530 Subject: [PATCH] Fix wp-cli remove unwanted space --- bin/easyengine | 92 ++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 52 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index 2eed4354..c5f0a853 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -24,66 +24,54 @@ if [ "$EE_FIRST" = "version" ] || [ "$EE_FIRST" = "--version" ] || [ "$EE_FIRST" then # Display Easy Engine Version echo "EasyEngine (ee) version: $EE_VERSION" - # EasyEngine stack/system elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ] then - # EasyEngine install - if [ "$EE_SECOND" = "install" ] - then - - if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "adminer" ]; then - - if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ]; then - # Setup nginx/php repository - ee_mod_repo_$EE_THIRD - - # Fix GnuPG key - ee_lib_gpg_key_fix - fi - - if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then - - # Execute: apt-get update - ee_lib_apt_get_update - - # Install nginx/php/mysql/postfix package - ee_mod_install_$EE_THIRD - - elif [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ];then - # Install phpmyadmin/adminer - ee_ven_install_$EE_THIRD - fi - - if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then - # Setup nginx/php/mysql - ee_mod_setup_$EE_THIRD - fi - - if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then + if [ "$EE_SECOND" = "install" ]; then + if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ]; then + # Setup nginx/php repository + ee_mod_repo_$EE_THIRD + + # Fix GnuPG key + ee_lib_gpg_key_fix + fi + + if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then + # Execute: apt-get update + ee_lib_apt_get_update + + # Install nginx/php/mysql/postfix package + ee_mod_install_$EE_THIRD + elif [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ];then + # Install phpmyadmin/adminer + ee_ven_install_$EE_THIRD + fi - # Restart php5-fpm - if [ "$EE_THIRD" = "php" ];then - ee_lib_service php5-fpm restart + if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then + # Setup nginx/php/mysql + ee_mod_setup_$EE_THIRD + fi - # Initialize Git - EE_GIT_DIR=/etc/php5/ - ee_lib_git_init - else - # Restart nginx/mysql/postfix - ee_lib_service $EE_THIRD restart + if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ]; then + # Restart php5-fpm + if [ "$EE_THIRD" = "php" ];then + ee_lib_service php5-fpm restart + + # Initialize Git + EE_GIT_DIR=/etc/php5/ + ee_lib_git_init + else + # Restart nginx/mysql/postfix + ee_lib_service $EE_THIRD restart - # Initialize Git - EE_GIT_DIR=/etc/$EE_THIRD/ - ee_lib_git_init - fi - + # Initialize Git + EE_GIT_DIR=/etc/$EE_THIRD/ + ee_lib_git_init fi - - # Display success message - ee_lib_echo "$EE_THIRD successfully installed" - fi + + # Display success message + ee_lib_echo "$EE_THIRD successfully installed" fi fi