Set mariadb password for rss restore

This commit is contained in:
Bob Mottram 2017-06-25 18:56:03 +01:00
parent c6bef7a77b
commit b4b50ffc7d
1 changed files with 9 additions and 0 deletions

View File

@ -195,6 +195,10 @@ function restore_local_rss {
rm -rf $temp_restore_dir rm -rf $temp_restore_dir
fi fi
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 { function backup_remote_rss {
@ -253,6 +257,11 @@ function restore_remote_rss {
if [ -d /root/tempttrss ]; then if [ -d /root/tempttrss ]; then
rm -rf /root/tempttrss rm -rf /root/tempttrss
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=
echo $"Restore of ttrss complete" echo $"Restore of ttrss complete"
fi fi
} }