From 8f80033313c4f90e4eaf45a8a41f39d481c154be Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Jun 2017 17:35:16 +0100 Subject: [PATCH] Ghost restore database password --- src/freedombone-app-ghost | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index 3367ae3c..33f0aa5c 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -234,6 +234,10 @@ function restore_local_ghost { function_check restore_database restore_database ghost ${GHOST_DOMAIN_NAME} + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + ghost_config=/var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js + sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config + systemctl start ghost restart_site fi @@ -274,6 +278,11 @@ function restore_remote_ghost { ghost_create_database restore_database_from_friend ghost ${GHOST_DOMAIN_NAME} + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + ghost_config=/var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js + sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config + systemctl start ghost restart_site chown -R ghost: /var/www/$GHOST_DOMAIN_NAME/htdocs/