v1.1
This commit is contained in:
1
lib.sh
1
lib.sh
@@ -275,7 +275,6 @@ then
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
test_connection() {
|
test_connection() {
|
||||||
# Install dnsutils if not existing
|
# Install dnsutils if not existing
|
||||||
if ! dpkg-query -W -f='${Status}' "dnsutils" | grep -q "ok installed"
|
if ! dpkg-query -W -f='${Status}' "dnsutils" | grep -q "ok installed"
|
||||||
|
|||||||
@@ -511,7 +511,6 @@ occ_command notification:generate -l "Please remember to setup SMTP to be able t
|
|||||||
occ_command notification:generate -l "If you need support, please visit the shop: https://shop.hanssonit.se" "$NCADMIN" "Do you need support?"
|
occ_command notification:generate -l "If you need support, please visit the shop: https://shop.hanssonit.se" "$NCADMIN" "Do you need support?"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Add temporary fix if needed
|
# Add temporary fix if needed
|
||||||
bash "$SCRIPTS"/temporary-fix.sh
|
bash "$SCRIPTS"/temporary-fix.sh
|
||||||
rm "$SCRIPTS"/temporary-fix.sh
|
rm "$SCRIPTS"/temporary-fix.sh
|
||||||
|
|||||||
@@ -168,32 +168,6 @@ choice=$(< results)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Set DNS resolver
|
|
||||||
whiptail --title "Set DNS Resolver" --radiolist --separate-output "Which DNS provider should this Nextcloud box use?\nSelect by pressing the spacebar and ENTER" "$WT_HEIGHT" "$WT_WIDTH" 4 \
|
|
||||||
"Quad9" "(https://www.quad9.net/) " on \
|
|
||||||
"Cloudflare" "(https://www.cloudflare.com/dns/) " off \
|
|
||||||
"Local" "($GATEWAY + 149.112.112.112) " off 2>results
|
|
||||||
|
|
||||||
choice=$(< results)
|
|
||||||
case "$choice" in
|
|
||||||
Quad9)
|
|
||||||
sed -i "s|#DNS=.*|DNS=9.9.9.9 2620:fe::fe|g" /etc/systemd/resolved.conf
|
|
||||||
sed -i "s|#FallbackDNS=.*|FallbackDNS=149.112.112.112 2620:fe::9|g" /etc/systemd/resolved.conf
|
|
||||||
;;
|
|
||||||
Cloudflare)
|
|
||||||
sed -i "s|#DNS=.*|DNS=1.1.1.1 2606:4700:4700::1111|g" /etc/systemd/resolved.conf
|
|
||||||
sed -i "s|#FallbackDNS=.*|FallbackDNS=1.0.0.1 2606:4700:4700::1001|g" /etc/systemd/resolved.conf
|
|
||||||
;;
|
|
||||||
Local)
|
|
||||||
sed -i "s|#DNS=.*|DNS=$GATEWAY|g" /etc/systemd/resolved.conf
|
|
||||||
sed -i "s|#FallbackDNS=.*|FallbackDNS=149.112.112.112 2620:fe::9|g" /etc/systemd/resolved.conf
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
check_command systemctl restart network-manager.service
|
|
||||||
network_ok
|
|
||||||
|
|
||||||
# Check where the best mirrors are and update
|
# Check where the best mirrors are and update
|
||||||
echo
|
echo
|
||||||
printf "Your current server repository is: ${ICyan}%s${Color_Off}\n" "$REPO"
|
printf "Your current server repository is: ${ICyan}%s${Color_Off}\n" "$REPO"
|
||||||
|
|||||||
Reference in New Issue
Block a user