Selaa lähdekoodia

Move remote cjdns restore to app script

Bob Mottram 8 vuotta sitten
vanhempi
commit
f4d4aeacfe
2 muutettua tiedostoa jossa 13 lisäystä ja 22 poistoa
  1. 13
    2
      src/freedombone-app-cjdns
  2. 0
    20
      src/freedombone-restore-remote

+ 13
- 2
src/freedombone-app-cjdns Näytä tiedosto

@@ -42,7 +42,7 @@ CJDCMD_REPO="https://github.com/inhies/cjdcmd"
42 42
 CJDCMD_COMMIT='973cca6ed0eecf9041c3403a40193c0b1291b808'
43 43
 
44 44
 function reconfigure_cjdns {
45
-    echo -n ''
45
+	echo -n ''
46 46
 }
47 47
 
48 48
 function upgrade_cjdns {
@@ -148,7 +148,18 @@ function backup_remote_cjdns {
148 148
 }
149 149
 
150 150
 function restore_remote_cjdns {
151
-	echo -n ''
151
+	if [ -d $SERVER_DIRECTORY/backup/cjdns ]; then
152
+		echo $"Restoring cjdns installation"
153
+		temp_restore_dir=/root/tempcjdns
154
+		function_check restore_directory_from_friend
155
+		restore_directory_from_friend $temp_restore_dir cjdns
156
+		rm -rf /etc/cjdns
157
+		cp -r $temp_restore_dir/etc/cjdns /etc/
158
+		if [ ! "$?" = "0" ]; then
159
+			exit 7438
160
+		fi
161
+		rm -rf $temp_restore_dir
162
+	fi
152 163
 }
153 164
 
154 165
 function remove_cjdns {

+ 0
- 20
src/freedombone-restore-remote Näytä tiedosto

@@ -666,25 +666,6 @@ function restore_mailing_list {
666 666
 	fi
667 667
 }
668 668
 
669
-function restore_cjdns {
670
-	if [[ $RESTORE_APP != 'all' ]]; then
671
-		if [[ $RESTORE_APP != 'cjdns' ]]; then
672
-			return
673
-		fi
674
-	fi
675
-	if [ -d $SERVER_DIRECTORY/backup/cjdns ]; then
676
-		echo $"Restoring cjdns installation"
677
-		temp_restore_dir=/root/tempcjdns
678
-		restore_directory_from_friend $temp_restore_dir cjdns
679
-		rm -rf /etc/cjdns
680
-		cp -r $temp_restore_dir/etc/cjdns /etc/
681
-		if [ ! "$?" = "0" ]; then
682
-			exit 7438
683
-		fi
684
-		rm -rf $temp_restore_dir
685
-	fi
686
-}
687
-
688 669
 function restore_voip {
689 670
 	if [[ $RESTORE_APP != 'all' ]]; then
690 671
 		if [[ $RESTORE_APP != 'voip' ]]; then
@@ -813,7 +794,6 @@ restore_mailing_list
813 794
 restore_email
814 795
 #restore_apps remote
815 796
 
816
-restore_cjdns
817 797
 restore_voip
818 798
 restore_tox
819 799
 restore_dlna