Browse Source

Dialog messages

Bob Mottram 9 years ago
parent
commit
a13bb61dcb
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      src/freedombone-config

+ 5
- 4
src/freedombone-config View File

142
 
142
 
143
 function validate_freedns_code {
143
 function validate_freedns_code {
144
     freedns_code="$1"
144
     freedns_code="$1"
145
+
146
+    FREEDNS_MESSAGE=$"Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
147
+
145
     if [[ "$freedns_code" == *"."* || "$freedns_code" == "http"* || "$freedns_code" == *"wget "* || "$freedns_code" == *" "* ]]; then
148
     if [[ "$freedns_code" == *"."* || "$freedns_code" == "http"* || "$freedns_code" == *"wget "* || "$freedns_code" == *" "* ]]; then
146
-        echo $'Only the code between ? and = should be entered'
149
+        dialog --title $"Invalid Freedns Code" --msgbox $'$FREEDNS_MESSAGE' 10 70
147
         VALID_CODE=
150
         VALID_CODE=
148
     fi
151
     fi
149
     if [ ${#freedns_code} -lt 30 ]; then
152
     if [ ${#freedns_code} -lt 30 ]; then
150
-        echo $'Freedns code is too short. Did you enter the entire code?'
153
+        dialog --title $"Invalid Freedns Code" --msgbox $'Freedns code is too short. Did you enter the entire code?' 6 70
151
         VALID_CODE=
154
         VALID_CODE=
152
     fi
155
     fi
153
     VALID_CODE='yes'
156
     VALID_CODE='yes'
659
 
662
 
660
     interactive_select_language
663
     interactive_select_language
661
 
664
 
662
-    FREEDNS_MESSAGE=$"Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
663
-
664
     if [[ $ONION_ONLY == "no" ]]; then
665
     if [[ $ONION_ONLY == "no" ]]; then
665
         INITIAL_MESSAGE=$"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE"
666
         INITIAL_MESSAGE=$"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE"
666
     else
667
     else