Browse Source

Allow dns for onion only installs

Bob Mottram 9 years ago
parent
commit
ef1a0100ab
1 changed files with 16 additions and 6 deletions
  1. 16
    6
      src/freedombone-config

+ 16
- 6
src/freedombone-config View File

@@ -208,8 +208,12 @@ function save_configuration_file {
208 208
         echo "ENABLE_BABEL=$ENABLE_BABEL" >> $CONFIGURATION_FILE
209 209
     fi
210 210
     echo "DEBIAN_REPO=$DEBIAN_REPO" >> $CONFIGURATION_FILE
211
-    echo "NAMESERVER1=$NAMESERVER1" >> $CONFIGURATION_FILE
212
-    echo "NAMESERVER2=$NAMESERVER2" >> $CONFIGURATION_FILE
211
+    if [ $NAMESERVER1 ]; then
212
+        echo "NAMESERVER1=$NAMESERVER1" >> $CONFIGURATION_FILE
213
+    fi
214
+    if [ $NAMESERVER2 ]; then
215
+        echo "NAMESERVER2=$NAMESERVER2" >> $CONFIGURATION_FILE
216
+    fi
213 217
     if [ $WIKI_TITLE ]; then
214 218
         echo "WIKI_TITLE=$WIKI_TITLE" >> $CONFIGURATION_FILE
215 219
     fi
@@ -548,7 +552,13 @@ function interactive_configuration {
548 552
 
549 553
     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."
550 554
 
551
-    dialog --title $"Freedombone" --msgbox $"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" 15 50
555
+    if [[ $ONION_ONLY == "no" ]]; then
556
+        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"
557
+    else
558
+        INITIAL_MESSAGE=$"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nWeb sites created will only be viewable within a Tor browser.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE"
559
+    fi
560
+
561
+    dialog --title $"Freedombone" --msgbox "$INITIAL_MESSAGE" 15 50
552 562
 
553 563
     data=$(tempfile 2>/dev/null)
554 564
     trap "rm -f $data" 0 1 2 5 15
@@ -987,7 +997,7 @@ function interactive_configuration {
987 997
         DEBIAN_REPO='ftp.de.debian.org'
988 998
     fi
989 999
 
990
-    if [[ $MINIMAL_INSTALL == "no" ]]; then
1000
+    if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
991 1001
         data=$(tempfile 2>/dev/null)
992 1002
         trap "rm -f $data" 0 1 2 5 15
993 1003
         dialog --backtitle $"Freedombone Configuration" \
@@ -1071,7 +1081,7 @@ function interactive_configuration {
1071 1081
         NAMESERVER2='213.73.91.35'
1072 1082
     fi
1073 1083
 
1074
-    if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
1084
+    if [[ $SYSTEM_TYPE != "$VARIANT_MESH" && $ONION_ONLY == "no" ]]; then
1075 1085
 
1076 1086
         data=$(tempfile 2>/dev/null)
1077 1087
         trap "rm -f $data" 0 1 2 5 15
@@ -1196,7 +1206,7 @@ function interactive_configuration {
1196 1206
         save_configuration_file
1197 1207
     fi
1198 1208
 
1199
-    if [[ $MINIMAL_INSTALL == "no" ]]; then
1209
+    if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
1200 1210
         SET_STATIC_IP="no"
1201 1211
         dialog --title $"Static local IP address" \
1202 1212
                --backtitle $"Freedombone Configuration" \