Browse Source

Fixing selective remote restore

Bob Mottram 9 years ago
parent
commit
03b98395f2
1 changed files with 50 additions and 36 deletions
  1. 50
    36
      src/freedombone-controlpanel

+ 50
- 36
src/freedombone-controlpanel View File

@@ -941,8 +941,8 @@ function restore_from_usb {
941 941
         dialog --backtitle $"Freedombone Control Panel" \
942 942
                --title $"Restore from USB backup" \
943 943
                --radiolist $"Choose an application to restore:" 31 70 28 \
944
-               1 $"Everything" on \
945
-               2 $"Return to the backup and restore menu" off \
944
+               1 $"Everything" off \
945
+               2 $"Return to the backup and restore menu" on \
946 946
                3 $"Configuration files" off \
947 947
                4 $"MariaDB settings" off \
948 948
                5 $"Let's Encrypt account" off \
@@ -977,6 +977,11 @@ function restore_from_usb {
977 977
             1) break;;
978 978
             255) break;;
979 979
         esac
980
+
981
+        if [ $(cat $data) -ne 2 ]; then
982
+            clear
983
+        fi
984
+
980 985
         case $(cat $data) in
981 986
             1) ${PROJECT_NAME}-restore-local $USB_DRIVE;;
982 987
             2) return;;
@@ -1024,8 +1029,8 @@ function restore_from_remote {
1024 1029
         dialog --backtitle $"Freedombone Control Panel" \
1025 1030
                --title $"Restore from ${remote_domain_name}" \
1026 1031
                --radiolist $"Choose an application to restore:" 31 70 28 \
1027
-               1 $"Everything" on \
1028
-               2 $"Return to the backup and restore menu" off \
1032
+               1 $"Everything" off \
1033
+               2 $"Return to the backup and restore menu" on \
1029 1034
                3 $"Configuration files" off \
1030 1035
                4 $"MariaDB settings" off \
1031 1036
                5 $"Let's Encrypt account" off \
@@ -1037,27 +1042,34 @@ function restore_from_remote {
1037 1042
                11 $"IPFS" off \
1038 1043
                12 $"SSH keys" off \
1039 1044
                13 $"User configuration files" off \
1040
-               14 $"SSL/TLS certificates" off \
1041
-               15 $"Personal settings" off \
1042
-               16 $"Mailing List" off \
1043
-               17 $"XMPP chat" off \
1044
-               18 $"GNU Social" off \
1045
-               19 $"Hubzilla" off \
1046
-               20 $"Owncloud" off \
1047
-               21 $"Gogs" off \
1048
-               22 $"Wiki" off \
1049
-               23 $"Blog" off \
1050
-               24 $"CJDNS" off \
1051
-               25 $"Email" off \
1052
-               26 $"DLNA" off \
1053
-               27 $"VoIP" off \
1054
-               28 $"RSS reader" off \
1055
-               29 $"Tox" off 2> $data
1045
+               14 $"User local files" off \
1046
+               15 $"User fin files" off \
1047
+               16 $"SSL/TLS certificates" off \
1048
+               17 $"Personal settings" off \
1049
+               18 $"Mailing List" off \
1050
+               19 $"XMPP chat" off \
1051
+               20 $"GNU Social" off \
1052
+               21 $"Hubzilla" off \
1053
+               22 $"Owncloud" off \
1054
+               23 $"Gogs" off \
1055
+               24 $"Wiki" off \
1056
+               25 $"Blog" off \
1057
+               26 $"CJDNS" off \
1058
+               27 $"Email" off \
1059
+               28 $"DLNA" off \
1060
+               29 $"VoIP" off \
1061
+               30 $"RSS reader" off \
1062
+               31 $"Tox" off 2> $data
1056 1063
         sel=$?
1057 1064
         case $sel in
1058 1065
             1) break;;
1059 1066
             255) break;;
1060 1067
         esac
1068
+
1069
+        if [ $(cat $data) -ne 2 ]; then
1070
+            clear
1071
+        fi
1072
+
1061 1073
         case $(cat $data) in
1062 1074
             1) ${PROJECT_NAME}-restore-remote $remote_domain_name;;
1063 1075
             2) return;;
@@ -1072,22 +1084,24 @@ function restore_from_remote {
1072 1084
             11) ${PROJECT_NAME}-restore-remote $remote_domain_name ipfs;;
1073 1085
             12) ${PROJECT_NAME}-restore-remote $remote_domain_name ssh;;
1074 1086
             13) ${PROJECT_NAME}-restore-remote $remote_domain_name userconfig;;
1075
-            14) ${PROJECT_NAME}-restore-remote $remote_domain_name certs;;
1076
-            15) ${PROJECT_NAME}-restore-remote $remote_domain_name personal;;
1077
-            16) ${PROJECT_NAME}-restore-remote $remote_domain_name mailinglist;;
1078
-            17) ${PROJECT_NAME}-restore-remote $remote_domain_name xmpp;;
1079
-            18) ${PROJECT_NAME}-restore-remote $remote_domain_name gnusocial;;
1080
-            19) ${PROJECT_NAME}-restore-remote $remote_domain_name hubzilla;;
1081
-            20) ${PROJECT_NAME}-restore-remote $remote_domain_name owncloud;;
1082
-            21) ${PROJECT_NAME}-restore-remote $remote_domain_name gogs;;
1083
-            22) ${PROJECT_NAME}-restore-remote $remote_domain_name wiki;;
1084
-            23) ${PROJECT_NAME}-restore-remote $remote_domain_name blog;;
1085
-            24) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
1086
-            25) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
1087
-            26) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
1088
-            27) ${PROJECT_NAME}-restore-remote $remote_domain_name voip;;
1089
-            28) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
1090
-            29) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
1087
+            14) ${PROJECT_NAME}-restore-remote $remote_domain_name userlocal;;
1088
+            15) ${PROJECT_NAME}-restore-remote $remote_domain_name userfin;;
1089
+            16) ${PROJECT_NAME}-restore-remote $remote_domain_name certs;;
1090
+            17) ${PROJECT_NAME}-restore-remote $remote_domain_name personal;;
1091
+            18) ${PROJECT_NAME}-restore-remote $remote_domain_name mailinglist;;
1092
+            19) ${PROJECT_NAME}-restore-remote $remote_domain_name xmpp;;
1093
+            20) ${PROJECT_NAME}-restore-remote $remote_domain_name gnusocial;;
1094
+            21) ${PROJECT_NAME}-restore-remote $remote_domain_name hubzilla;;
1095
+            22) ${PROJECT_NAME}-restore-remote $remote_domain_name owncloud;;
1096
+            23) ${PROJECT_NAME}-restore-remote $remote_domain_name gogs;;
1097
+            24) ${PROJECT_NAME}-restore-remote $remote_domain_name wiki;;
1098
+            25) ${PROJECT_NAME}-restore-remote $remote_domain_name blog;;
1099
+            26) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
1100
+            27) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
1101
+            28) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
1102
+            29) ${PROJECT_NAME}-restore-remote $remote_domain_name voip;;
1103
+            30) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
1104
+            31) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
1091 1105
         esac
1092 1106
     done
1093 1107
     any_key