From b4b50ffc7d52493796a3a21460d1b49b0e84c4e0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Jun 2017 18:56:03 +0100 Subject: [PATCH] Set mariadb password for rss restore --- src/freedombone-app-rss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index a2f36018..b77640c7 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -195,6 +195,10 @@ function restore_local_rss { rm -rf $temp_restore_dir fi fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + sed -i "s|define('DB_PASS'.*|define('DB_PASS', '${MARIADB_PASSWORD}');|g" $RSS_READER_PATH/config.php + MARIADB_PASSWORD= } function backup_remote_rss { @@ -253,6 +257,11 @@ function restore_remote_rss { if [ -d /root/tempttrss ]; then rm -rf /root/tempttrss fi + + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + sed -i "s|define('DB_PASS'.*|define('DB_PASS', '${MARIADB_PASSWORD}');|g" $RSS_READER_PATH/config.php + MARIADB_PASSWORD= + echo $"Restore of ttrss complete" fi }