Sfoglia il codice sorgente

Move remote gnusocial restore to app script

Bob Mottram 8 anni fa
parent
commit
26f3340120
2 ha cambiato i file con 19 aggiunte e 26 eliminazioni
  1. 19
    1
      src/freedombone-app-gnusocial
  2. 0
    25
      src/freedombone-restore-remote

+ 19
- 1
src/freedombone-app-gnusocial Vedi File

163
 }
163
 }
164
 
164
 
165
 function restore_remote_gnusocial {
165
 function restore_remote_gnusocial {
166
-	echo -n ''
166
+	if grep -q "GNU Social domain" $COMPLETION_FILE; then
167
+		echo $"Restoring GNU Social"
168
+		MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
169
+
170
+		# stop the daemons
171
+		cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
172
+		scripts/stopdaemons.sh
173
+
174
+		function_check restore_database_from_friend
175
+		restore_database_from_friend gnusocial ${MICROBLOG_DOMAIN_NAME}
176
+		if [ -d /root/tempgnusocial ]; then
177
+			rm -rf /root/tempgnusocial
178
+		fi
179
+
180
+		# start the daemons
181
+		cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
182
+		scripts/startdaemons.sh
183
+		echo $"Restore of GNU Social complete"
184
+	fi
167
 }
185
 }
168
 
186
 
169
 function remove_gnusocial {
187
 function remove_gnusocial {

+ 0
- 25
src/freedombone-restore-remote Vedi File

666
 	fi
666
 	fi
667
 }
667
 }
668
 
668
 
669
-function restore_gnusocial {
670
-	if [[ $RESTORE_APP != 'all' ]]; then
671
-		if [[ $RESTORE_APP != 'gnusocial' ]]; then
672
-			return
673
-		fi
674
-	fi
675
-	if grep -q "GNU Social domain" $COMPLETION_FILE; then
676
-		MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
677
-
678
-		# stop the daemons
679
-		cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
680
-		scripts/stopdaemons.sh
681
-
682
-		restore_database_from_friend gnusocial ${MICROBLOG_DOMAIN_NAME}
683
-		if [ -d /root/tempgnusocial ]; then
684
-			rm -rf /root/tempgnusocial
685
-		fi
686
-
687
-		# start the daemons
688
-		cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
689
-		scripts/startdaemons.sh
690
-	fi
691
-}
692
-
693
 function restore_rss {
669
 function restore_rss {
694
 	if [[ $RESTORE_APP != 'all' ]]; then
670
 	if [[ $RESTORE_APP != 'all' ]]; then
695
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
671
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
1098
 restore_mailing_list
1074
 restore_mailing_list
1099
 restore_email
1075
 restore_email
1100
 
1076
 
1101
-restore_gnusocial
1102
 restore_hubzilla
1077
 restore_hubzilla
1103
 restore_rss
1078
 restore_rss
1104
 restore_syncthing
1079
 restore_syncthing