Restore ghost database password

This commit is contained in:
Bob Mottram 2017-05-11 23:26:08 +01:00
parent 26fb6bd604
commit cc72169bfd
1 changed files with 17 additions and 0 deletions

View File

@ -223,11 +223,22 @@ function restore_local_ghost {
GHOST_DOMAIN_NAME=$(get_completion_param "ghost domain")
fi
if [ $GHOST_DOMAIN_NAME ]; then
function_check get_mariadb_password
get_mariadb_password
DATABASE_PASSWORD=$MARIADB_PASSWORD
systemctl stop ghost
function_check ghost_create_database
ghost_create_database
function_check restore_database
restore_database ghost ${GHOST_DOMAIN_NAME}
systemctl start ghost
DATABASE_PASSWORD=
MARIADB_PASSWORD=
fi
}
@ -255,6 +266,9 @@ function restore_remote_ghost {
GHOST_DOMAIN_NAME=$(get_completion_param "ghost domain")
fi
function_check get_mariadb_password
get_mariadb_password
function_check restore_database_from_friend
function_check ghost_create_database
@ -356,6 +370,9 @@ function ghost_create_database {
return
fi
function_check get_mariadb_password
get_mariadb_password
function_check create_database
create_database ghost "$GHOST_ADMIN_PASSWORD"
}