From f869db0ca00b11b1a3bbf38a1773c6b2702c7c58 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 10 Jul 2016 14:07:31 +0100 Subject: [PATCH] Move remote rss restore to app script --- src/freedombone-app-rss | 14 +++++++++++++- src/freedombone-restore-remote | 19 ------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index a3dcbfd5..a8c7090f 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -144,7 +144,19 @@ function backup_remote_rss { } function restore_remote_rss { - echo -n '' + if grep -q "RSS reader domain" $COMPLETION_FILE; then + echo $"Restoring ttrss" + RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') + function_check restore_database_from_friend + restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME} + if [ -d $SERVER_DIRECTORY/backup/ttrss ]; then + chown -R www-data:www-data /etc/share/tt-rss + fi + if [ -d /root/tempttrss ]; then + rm -rf /root/tempttrss + fi + echo $"Restore of ttrss complete" + fi } function remove_rss { diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index 11039619..12fe23d0 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -666,24 +666,6 @@ function restore_mailing_list { fi } -function restore_rss { - if [[ $RESTORE_APP != 'all' ]]; then - if [[ $RESTORE_APP != 'ttrss' ]]; then - return - fi - fi - if grep -q "RSS reader domain" $COMPLETION_FILE; then - RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') - restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME} - if [ -d $SERVER_DIRECTORY/backup/ttrss ]; then - chown -R www-data:www-data /etc/share/tt-rss - fi - if [ -d /root/tempttrss ]; then - rm -rf /root/tempttrss - fi - fi -} - function restore_syncthing { if [[ $RESTORE_APP != 'all' ]]; then if [[ $RESTORE_APP != 'syncthing' ]]; then @@ -1052,7 +1034,6 @@ restore_personal_settings restore_mailing_list restore_email -restore_rss restore_syncthing restore_mediagoblin restore_gogs