Procházet zdrojové kódy

Local backup of rss

Bob Mottram před 9 roky
rodič
revize
5d0241b18c
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9
    0
      src/freedombone-backup-local

+ 9
- 0
src/freedombone-backup-local Zobrazit soubor

@@ -80,6 +80,10 @@ function restart_site {
80 80
 }
81 81
 
82 82
 function update_domains {
83
+    RSS_READER_DOMAIN_NAME='ttrss'
84
+    if grep -q "RSS reader domain" $COMPLETION_FILE; then
85
+        RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
86
+    fi
83 87
     GIT_DOMAIN_NAME='gogs'
84 88
     if grep -q "Gogs domain" $COMPLETION_FILE; then
85 89
         GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
@@ -341,6 +345,7 @@ function backup_directories {
341 345
         "none,                               none,       /var/lib/dokuwiki,                               wiki"
342 346
         "none,                               none,       /etc/dokuwiki,                                   wiki2"
343 347
         "none,                               none,       /etc/ssl,                                        ssl"
348
+        "/etc/share/ttrss,                   ttrss,      /root/tempttrssdata,                             ttrss"
344 349
         "none,                               none,       /var/spool/mlmmj,                                mailinglist"
345 350
         "none,                               none,       /var/lib/prosody,                                xmpp"
346 351
         "none,                               none,       /etc/nginx/sites-available,                      web"
@@ -380,6 +385,9 @@ function backup_directories {
380 385
         if [[ "$database_name" == *"gogs"* ]]; then
381 386
             suspend_site ${GIT_DOMAIN_NAME}
382 387
         fi
388
+        if [[ "$database_name" == *"ttrss"* ]]; then
389
+            suspend_site ${RSS_READER_DOMAIN_NAME}
390
+        fi
383 391
 
384 392
         if [[ $required_directory != "none" ]]; then
385 393
             if [ -d $required_directory ]; then
@@ -504,6 +512,7 @@ function valid_backup_destination {
504 512
           "$destination_dir" == "dlna" || \
505 513
           "$destination_dir" == "tox" || \
506 514
           "$destination_dir" == "ssl" || \
515
+          "$destination_dir" == "ttrss" || \
507 516
           "$destination_dir" == "blog" || \
508 517
           "$destination_dir" == "owncloud" || \
509 518
           "$destination_dir" == "owncloud2" || \