From cc72169bfd337ac55e5a1eda15904f86d4bb1776 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 May 2017 23:26:08 +0100 Subject: [PATCH] Restore ghost database password --- src/freedombone-app-ghost | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index a8d93762..76c1ebc9 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -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" }