From ef1a0100ababcb6e9ef5614bcb613d8aa6a93e76 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 30 Dec 2015 22:59:09 +0000 Subject: [PATCH] Allow dns for onion only installs --- src/freedombone-config | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/freedombone-config b/src/freedombone-config index 918d37b6..f08e619d 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -208,8 +208,12 @@ function save_configuration_file { echo "ENABLE_BABEL=$ENABLE_BABEL" >> $CONFIGURATION_FILE fi echo "DEBIAN_REPO=$DEBIAN_REPO" >> $CONFIGURATION_FILE - echo "NAMESERVER1=$NAMESERVER1" >> $CONFIGURATION_FILE - echo "NAMESERVER2=$NAMESERVER2" >> $CONFIGURATION_FILE + if [ $NAMESERVER1 ]; then + echo "NAMESERVER1=$NAMESERVER1" >> $CONFIGURATION_FILE + fi + if [ $NAMESERVER2 ]; then + echo "NAMESERVER2=$NAMESERVER2" >> $CONFIGURATION_FILE + fi if [ $WIKI_TITLE ]; then echo "WIKI_TITLE=$WIKI_TITLE" >> $CONFIGURATION_FILE fi @@ -548,7 +552,13 @@ function interactive_configuration { 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." - 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 + if [[ $ONION_ONLY == "no" ]]; then + 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" + else + 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" + fi + + dialog --title $"Freedombone" --msgbox "$INITIAL_MESSAGE" 15 50 data=$(tempfile 2>/dev/null) trap "rm -f $data" 0 1 2 5 15 @@ -987,7 +997,7 @@ function interactive_configuration { DEBIAN_REPO='ftp.de.debian.org' fi - if [[ $MINIMAL_INSTALL == "no" ]]; then + if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then data=$(tempfile 2>/dev/null) trap "rm -f $data" 0 1 2 5 15 dialog --backtitle $"Freedombone Configuration" \ @@ -1071,7 +1081,7 @@ function interactive_configuration { NAMESERVER2='213.73.91.35' fi - if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then + if [[ $SYSTEM_TYPE != "$VARIANT_MESH" && $ONION_ONLY == "no" ]]; then data=$(tempfile 2>/dev/null) trap "rm -f $data" 0 1 2 5 15 @@ -1196,7 +1206,7 @@ function interactive_configuration { save_configuration_file fi - if [[ $MINIMAL_INSTALL == "no" ]]; then + if [[ $MINIMAL_INSTALL == "no" && $ONION_ONLY == "no" ]]; then SET_STATIC_IP="no" dialog --title $"Static local IP address" \ --backtitle $"Freedombone Configuration" \