From f0925ebb9779584e50c3f908c9a7cb0916ee266e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 7 Jul 2016 14:04:00 +0100 Subject: [PATCH] Local backup of ttrss --- src/freedombone-app-rss | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 999c7e00..77e5736f 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -76,11 +76,31 @@ function upgrade_rss { } function backup_local_rss { - echo '' + RSS_READER_DOMAIN_NAME='ttrss' + if grep -q "RSS reader domain" $COMPLETION_FILE; then + RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') + fi + + if grep -q "RSS reader domain" $COMPLETION_FILE; then + if [ -d /etc/share/tt-rss ]; then + RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}') + + echo $"Backing up ttrss" + + function_check backup_database_local + backup_database_local ttrss + + function_check backup_directory_to_usb + backup_directory_to_usb /root/tempttrssdata ttrssdata + backup_directory_to_usb /etc/share/tt-rss ttrss + + echo $"ttrss backup complete" + fi + fi } function backup_remote_rss { - echo '' + echo -n '' } function remove_rss {