From 6dd37a323ee61e2c2123d8fa49d738fda2ab7086 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Wed, 22 Oct 2014 18:07:26 +0530 Subject: [PATCH] Added ee site update example.com --password --- bin/easyengine | 5 ++++- src/modules/site/update/ee_mod_site_update_password.sh | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index ac5b523c..863916d7 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -648,8 +648,11 @@ elif [ "$EE_FIRST" = "site" ]; then # Let's log site current option ee_lib_echo_escape "EE_SITE_CURRENT_WP = $EE_SITE_CURRENT_WP \nEE_SITE_CURRENT_CACHE = $EE_SITE_CURRENT_CACHE \nEE_SITE_CURRENT_TYPE = $EE_SITE_CURRENT_TYPE \nEE_SITE_UPDATE_TYPE = $EE_SITE_UPDATE_TYPE" &>> $EE_COMMAND_LOG + # Update WordPress user password + if [ "$EE_SITE_CREATE_OPTION" = "--password" ]; then + ee_mod_site_update_password # Lets update HTML|PHP website - if [[ "$EE_SITE_CURRENT_TYPE" = "--html" && "$EE_SITE_CREATE_OPTION" != "--html" ]] || [[ "$EE_SITE_CURRENT_TYPE" = "--php" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" ]]; then + elif [[ "$EE_SITE_CURRENT_TYPE" = "--html" && "$EE_SITE_CREATE_OPTION" != "--html" ]] || [[ "$EE_SITE_CURRENT_TYPE" = "--php" && "$EE_SITE_CREATE_OPTION" != "--html" && "$EE_SITE_CREATE_OPTION" != "--php" ]]; then # Lets call update function ee_mod_update_website diff --git a/src/modules/site/update/ee_mod_site_update_password.sh b/src/modules/site/update/ee_mod_site_update_password.sh index f8055b57..fc418175 100644 --- a/src/modules/site/update/ee_mod_site_update_password.sh +++ b/src/modules/site/update/ee_mod_site_update_password.sh @@ -12,7 +12,15 @@ ee_mod_site_update_password() if [ $? -eq 0 ]; then read -p "Provide WordPress user name [admin]: " ee_wp_user - if [[ $ee_wp_user = "" ]]; then + + # If user enter ? mark then show list of WordPress users + if [ "$ee_wp_user" = "?" ]; then + ee_lib_echo "List of WordPress users:" + wp --allow-root user list --fields=user_login + read -p "Provide WordPress user name [admin]: " ee_wp_user + fi + + if [ "$ee_wp_user" = "" ]; then ee_wp_user=admin fi