From f58e1a9eebd3d5bf9e57fcf62d6124fecc800761 Mon Sep 17 00:00:00 2001 From: Brennen Smith Date: Tue, 14 Oct 2014 16:04:18 -0700 Subject: [PATCH] Fixed site deletion when using external MySQL host --- src/modules/site/delete/ee_mod_delete_database.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/site/delete/ee_mod_delete_database.sh b/src/modules/site/delete/ee_mod_delete_database.sh index 9fa59443..dcd7e825 100644 --- a/src/modules/site/delete/ee_mod_delete_database.sh +++ b/src/modules/site/delete/ee_mod_delete_database.sh @@ -12,6 +12,11 @@ function ee_mod_delete_database() local ee_db_host=$(grep DB_HOST /var/www/$EE_DOMAIN/*-config.php | cut -d"'" -f4) ee_lib_echo_escape " DB_NAME = $ee_db_name \n DB_USER = $ee_db_user \n DB_HOST = $ee_db_host" + if [ "$EE_MYSQL_GRANT_HOST" != "localhost" ]; then + # If MySQL grant host is set, use that value instead + ee_db_host=$EE_MYSQL_GRANT_HOST + fi + if [ "$1" = "--no-prompt" ];then # Delete database without any prompt local ee_prompt="y"