ソースを参照

Local restore for rss

Bob Mottram 9 年 前
コミット
281a2cc547
共有1 個のファイルを変更した26 個の追加5 個の削除を含む
  1. 26
    5
      src/freedombone-restore-local

+ 26
- 5
src/freedombone-restore-local ファイルの表示

210
 }
210
 }
211
 
211
 
212
 function update_domains {
212
 function update_domains {
213
+    if grep -q "RSS reader domain" $COMPLETION_FILE; then
214
+        RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
215
+    fi
213
     if grep -q "GNU Social domain" $COMPLETION_FILE; then
216
     if grep -q "GNU Social domain" $COMPLETION_FILE; then
214
         MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
217
         MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
215
     fi
218
     fi
597
             chown root:dovecot /etc/ssl/certs/dovecot.*
600
             chown root:dovecot /etc/ssl/certs/dovecot.*
598
         fi
601
         fi
599
         if [ -f /etc/ssl/private/exim.key ]; then
602
         if [ -f /etc/ssl/private/exim.key ]; then
600
-			cp /etc/ssl/private/exim.key /etc/exim4
601
-			cp /etc/ssl/certs/exim.crt /etc/exim4
602
-			cp /etc/ssl/certs/exim.dhparam /etc/exim4
603
-			chown root:Debian-exim /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
604
-			chmod 640 /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
603
+            cp /etc/ssl/private/exim.key /etc/exim4
604
+            cp /etc/ssl/certs/exim.crt /etc/exim4
605
+            cp /etc/ssl/certs/exim.dhparam /etc/exim4
606
+            chown root:Debian-exim /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
607
+            chmod 640 /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
605
         fi
608
         fi
606
         if [ -f /etc/ssl/private/mumble.key ]; then
609
         if [ -f /etc/ssl/private/mumble.key ]; then
607
             if [ -d /var/lib/mumble-server ]; then
610
             if [ -d /var/lib/mumble-server ]; then
696
     fi
699
     fi
697
 }
700
 }
698
 
701
 
702
+function restore_rss_reader {
703
+    if [[ $RESTORE_APP != 'all' ]]; then
704
+        if [[ $RESTORE_APP != 'ttrss' ]]; then
705
+            return
706
+        fi
707
+    fi
708
+    if [ $RSS_READER_DOMAIN_NAME ]; then
709
+        restore_database ttrss ${RSS_READER_DOMAIN_NAME}
710
+        if [ -d $USB_MOUNT/backup/ttrss ]; then
711
+            chown -R www-data:www-data /etc/share/ttrss
712
+            if [ -d /root/tempttrss ]; then
713
+                rm -rf /root/tempttrss
714
+            fi
715
+        fi
716
+    fi
717
+}
718
+
699
 function restore_hubzilla {
719
 function restore_hubzilla {
700
     if [[ $RESTORE_APP != 'all' ]]; then
720
     if [[ $RESTORE_APP != 'all' ]]; then
701
         if [[ $RESTORE_APP != 'hubzilla' ]]; then
721
         if [[ $RESTORE_APP != 'hubzilla' ]]; then
1028
 restore_xmpp
1048
 restore_xmpp
1029
 restore_gnu_social
1049
 restore_gnu_social
1030
 restore_hubzilla
1050
 restore_hubzilla
1051
+restore_rss_reader
1031
 restore_owncloud
1052
 restore_owncloud
1032
 restore_gogs
1053
 restore_gogs
1033
 restore_wiki
1054
 restore_wiki