Ver código fonte

Remote backup of rss

Bob Mottram 9 anos atrás
pai
commit
23df08d0df
1 arquivos alterados com 17 adições e 0 exclusões
  1. 17
    0
      src/freedombone-backup-remote

+ 17
- 0
src/freedombone-backup-remote Ver arquivo

@@ -261,6 +261,22 @@ function backup_tor {
261 261
     fi
262 262
 }
263 263
 
264
+function backup_rss_reader {
265
+    if grep -q "RSS reader domain" $COMPLETION_FILE; then
266
+        RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
267
+        if [ -d /etc/share/ttrss ]; then
268
+            suspend_site ${RSS_READER_DOMAIN_NAME}
269
+            backup_database_to_friend ttrss
270
+            backup_directory_to_friend /root/tempttrssdata ttrssdata
271
+            echo $"Backing up RSS reader installation"
272
+            backup_directory_to_friend /etc/share/ttrss ttrss
273
+            restart_site
274
+        else
275
+            echo $"RSS reader domain specified but not found in /etc/share/ttrss}"
276
+        fi
277
+    fi
278
+}
279
+
264 280
 function backup_gnusocial {
265 281
     if grep -q "GNU Social domain" $COMPLETION_FILE; then
266 282
         MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
@@ -566,6 +582,7 @@ if [[ $TEST_MODE == "no" ]]; then
566 582
     backup_letsencrypt
567 583
     backup_tor
568 584
     backup_gnusocial
585
+    backup_rss_reader
569 586
     backup_hubzilla
570 587
     backup_owncloud
571 588
     backup_gogs