Ver código fonte

Move remote cjdns restore to app script

Bob Mottram 8 anos atrás
pai
commit
f4d4aeacfe
2 arquivos alterados com 13 adições e 22 exclusões
  1. 13
    2
      src/freedombone-app-cjdns
  2. 0
    20
      src/freedombone-restore-remote

+ 13
- 2
src/freedombone-app-cjdns Ver arquivo

42
 CJDCMD_COMMIT='973cca6ed0eecf9041c3403a40193c0b1291b808'
42
 CJDCMD_COMMIT='973cca6ed0eecf9041c3403a40193c0b1291b808'
43
 
43
 
44
 function reconfigure_cjdns {
44
 function reconfigure_cjdns {
45
-    echo -n ''
45
+	echo -n ''
46
 }
46
 }
47
 
47
 
48
 function upgrade_cjdns {
48
 function upgrade_cjdns {
148
 }
148
 }
149
 
149
 
150
 function restore_remote_cjdns {
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
 function remove_cjdns {
165
 function remove_cjdns {

+ 0
- 20
src/freedombone-restore-remote Ver arquivo

666
 	fi
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
 function restore_voip {
669
 function restore_voip {
689
 	if [[ $RESTORE_APP != 'all' ]]; then
670
 	if [[ $RESTORE_APP != 'all' ]]; then
690
 		if [[ $RESTORE_APP != 'voip' ]]; then
671
 		if [[ $RESTORE_APP != 'voip' ]]; then
813
 restore_email
794
 restore_email
814
 #restore_apps remote
795
 #restore_apps remote
815
 
796
 
816
-restore_cjdns
817
 restore_voip
797
 restore_voip
818
 restore_tox
798
 restore_tox
819
 restore_dlna
799
 restore_dlna