diff options
author | Daniel Hansson <mailto@danielhansson.nu> | 2022-05-19 02:26:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 02:26:32 +0300 |
commit | 41f77415cec06d7b7b8e6c8fe4c765384d3e058e (patch) | |
tree | 07512dbf284b3b2816b1bc335018c1bfba452acd | |
parent | dd4955dee368cc5ef82b67b169e2c83ae1336df0 (diff) |
make it optional to set your own DNS (#2331)
-rw-r--r-- | nextcloud_install_production.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index de7669a1..e3eb32e7 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -304,7 +304,8 @@ do $MENU_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ "Quad9" "(https://www.quad9.net/)" \ "Cloudflare" "(https://www.cloudflare.com/dns/)" \ -"Local" "($GATEWAY) - DNS on gateway" 3>&1 1>&2 2>&3) +"Local" "($GATEWAY) - DNS on gateway" \ +"Expert" "If you really know what you're doing!" 3>&1 1>&2 2>&3) fi case "$choice" in @@ -316,6 +317,7 @@ $MENU_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ ;; "Local") sed -i "s|^#\?DNS=.*$|DNS=$GATEWAY|g" /etc/systemd/resolved.conf + systemctl restart systemd-resolved.service if network_ok then break @@ -324,6 +326,19 @@ $MENU_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ continue fi ;; + "Expert") + OWNDNS=$(input_box_flow "Please choose your own DNS server(s) with a space in between, e.g: $GATEWAY 9.9.9.9 (NS1 NS2)") + sed -i "s|^#\?DNS=.*$|DNS=$OWNDNS|g" /etc/systemd/resolved.conf + systemctl restart systemd-resolved.service + if network_ok + then + break + unset OWNDNS + else + msg_box "Could not validate the local DNS server. Pick an Internet DNS server and try again." + continue + fi + ;; *) ;; esac |