From 50c64e26ba5d4f7b909ce6f68a1587b404075197 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Jun 2017 20:39:44 +0100 Subject: [PATCH] Set database password on hubzilla restore --- src/freedombone-app-hubzilla | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index 687ae55c..8bf80802 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2016 Bob Mottram +# Copyright (C) 2014-2017 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -243,6 +243,11 @@ function restore_local_hubzilla { if [ -d $temp_restore_dir ]; then rm -rf $temp_restore_dir fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs + sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $HUBZILLA_PATH/.htconfig.php + MARIADB_PASSWORD= fi } @@ -278,6 +283,11 @@ function restore_remote_hubzilla { if [ -d /root/temphubzilla ]; then rm -rf /root/temphubzilla fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs + sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $HUBZILLA_PATH/.htconfig.php + MARIADB_PASSWORD= } function remove_hubzilla {