From 83430ecf096a9369e8bee7ae873a4de9ef7fca98 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 9 Jul 2016 20:53:35 +0100 Subject: [PATCH] Move remote rss backup to app script --- src/freedombone-app-rss | 23 +++++++++++++++++++++-- src/freedombone-backup-remote | 17 ----------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index dbc933b4..a3dcbfd5 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -43,7 +43,7 @@ RSS_READER_GNUSOCIAL_REPO="https://github.com/bashrc/ttrss-gnusocial" RSS_READER_GNUSOCIAL_COMMIT='8b92b8f5db7b0d12459c7bd86a50f48815efe642' function reconfigure_rss { - echo -n '' + echo -n '' } function upgrade_rss { @@ -121,7 +121,26 @@ function restore_local_rss { } function backup_remote_rss { - echo -n '' + if grep -q "RSS reader domain" $COMPLETION_FILE; then + RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') + if [ -d /etc/share/tt-rss ]; then + function_check suspend_site + suspend_site ${RSS_READER_DOMAIN_NAME} + + function_check backup_database_to_friend + backup_database_to_friend ttrss + + echo $"Backing up RSS reader installation" + + function_check backup_directory_to_friend + backup_directory_to_friend /etc/share/tt-rss ttrss + + function_check restart_site + restart_site + else + echo $"RSS reader domain specified but not found in /etc/share/ttrss}" + fi + fi } function restore_remote_rss { diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 44698d51..fc9ce845 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -244,22 +244,6 @@ function backup_tor { fi } -function backup_rss { - if grep -q "RSS reader domain" $COMPLETION_FILE; then - RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') - if [ -d /etc/share/tt-rss ]; then - suspend_site ${RSS_READER_DOMAIN_NAME} - backup_database_to_friend ttrss - backup_directory_to_friend /root/tempttrssdata ttrssdata - echo $"Backing up RSS reader installation" - backup_directory_to_friend /etc/share/tt-rss ttrss - restart_site - else - echo $"RSS reader domain specified but not found in /etc/share/ttrss}" - fi - fi -} - function backup_hubzilla { if grep -q "Hubzilla domain" $COMPLETION_FILE; then HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') @@ -568,7 +552,6 @@ if [[ $TEST_MODE == "no" ]]; then backup_admin_readme backup_mariadb - backup_rss backup_hubzilla backup_syncthing backup_mediagoblin