From c1cf74c0d4aaeac20927568f526d9e2b5b78badd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Jun 2017 20:31:47 +0100 Subject: [PATCH] Set database password on friendica restore --- src/freedombone-app-friendica | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/freedombone-app-friendica b/src/freedombone-app-friendica index ed9b33db..dd4748d3 100755 --- a/src/freedombone-app-friendica +++ b/src/freedombone-app-friendica @@ -252,6 +252,11 @@ function restore_local_friendica { if [ -d $temp_restore_dir ]; then rm -rf $temp_restore_dir fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + FRIENDICA_PATH=/var/www/$FRIENDICA_DOMAIN_NAME/htdocs + sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $FRIENDICA_PATH/.htconfig.php + MARIADB_PASSWORD= fi } @@ -287,6 +292,11 @@ function restore_remote_friendica { if [ -d /root/tempfriendica ]; then rm -rf /root/tempfriendica fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + FRIENDICA_PATH=/var/www/$FRIENDICA_DOMAIN_NAME/htdocs + sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $FRIENDICA_PATH/.htconfig.php + MARIADB_PASSWORD= } function remove_friendica {