diff --git a/update-dns.sh b/update-dns.sh index d47d461..afb0602 100755 --- a/update-dns.sh +++ b/update-dns.sh @@ -9,23 +9,22 @@ else fi if [ -f /etc/netplan/eth0.yaml ]; then - cat /etc/netplan/eth0.yaml netfile=/etc/netplan/eth0.yaml elif [ -f /etc/netplan/network.yaml ]; then - cat /etc/netplan/network.yaml netfile=/etc/netplan/network.yaml elif [ -f /etc/network/interfaces ]; then - cat /etc/network/interfaces netfile=/etc/network/interfaces else echo -e "No network configs found\n" exit 1 fi -echo + +# cat ${netfile} +# echo chmod 0600 ${netfile} -read -e -p "Do you wish to continue changing the DNS? (Y/n) " choice +read -p "Do you wish to continue changing the DNS? (Y/n) " choice case "$choice" in [Nn]) echo -e "${Green}The DNS servers have NOT been updated${Color_Off}"