瀏覽代碼

Allow dns for onion only installs

Bob Mottram 9 年之前
父節點
當前提交
ef1a0100ab
共有 1 個檔案被更改,包括 16 行新增6 行删除
  1. 16
    6
      src/freedombone-config

+ 16
- 6
src/freedombone-config 查看文件

208
         echo "ENABLE_BABEL=$ENABLE_BABEL" >> $CONFIGURATION_FILE
208
         echo "ENABLE_BABEL=$ENABLE_BABEL" >> $CONFIGURATION_FILE
209
     fi
209
     fi
210
     echo "DEBIAN_REPO=$DEBIAN_REPO" >> $CONFIGURATION_FILE
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
     if [ $WIKI_TITLE ]; then
217
     if [ $WIKI_TITLE ]; then
214
         echo "WIKI_TITLE=$WIKI_TITLE" >> $CONFIGURATION_FILE
218
         echo "WIKI_TITLE=$WIKI_TITLE" >> $CONFIGURATION_FILE
215
     fi
219
     fi
548
 
552
 
549
     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."
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
     data=$(tempfile 2>/dev/null)
563
     data=$(tempfile 2>/dev/null)
554
     trap "rm -f $data" 0 1 2 5 15
564
     trap "rm -f $data" 0 1 2 5 15
987
         DEBIAN_REPO='ftp.de.debian.org'
997
         DEBIAN_REPO='ftp.de.debian.org'
988
     fi
998
     fi
989
 
999
 
990
-    if [[ $MINIMAL_INSTALL == "no" ]]; then
1000
+    if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
991
         data=$(tempfile 2>/dev/null)
1001
         data=$(tempfile 2>/dev/null)
992
         trap "rm -f $data" 0 1 2 5 15
1002
         trap "rm -f $data" 0 1 2 5 15
993
         dialog --backtitle $"Freedombone Configuration" \
1003
         dialog --backtitle $"Freedombone Configuration" \
1071
         NAMESERVER2='213.73.91.35'
1081
         NAMESERVER2='213.73.91.35'
1072
     fi
1082
     fi
1073
 
1083
 
1074
-    if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
1084
+    if [[ $SYSTEM_TYPE != "$VARIANT_MESH" && $ONION_ONLY == "no" ]]; then
1075
 
1085
 
1076
         data=$(tempfile 2>/dev/null)
1086
         data=$(tempfile 2>/dev/null)
1077
         trap "rm -f $data" 0 1 2 5 15
1087
         trap "rm -f $data" 0 1 2 5 15
1196
         save_configuration_file
1206
         save_configuration_file
1197
     fi
1207
     fi
1198
 
1208
 
1199
-    if [[ $MINIMAL_INSTALL == "no" ]]; then
1209
+    if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then
1200
         SET_STATIC_IP="no"
1210
         SET_STATIC_IP="no"
1201
         dialog --title $"Static local IP address" \
1211
         dialog --title $"Static local IP address" \
1202
                --backtitle $"Freedombone Configuration" \
1212
                --backtitle $"Freedombone Configuration" \