Update update-dns.sh
This commit is contained in:
@@ -9,23 +9,22 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/netplan/eth0.yaml ]; then
|
if [ -f /etc/netplan/eth0.yaml ]; then
|
||||||
cat /etc/netplan/eth0.yaml
|
|
||||||
netfile=/etc/netplan/eth0.yaml
|
netfile=/etc/netplan/eth0.yaml
|
||||||
elif [ -f /etc/netplan/network.yaml ]; then
|
elif [ -f /etc/netplan/network.yaml ]; then
|
||||||
cat /etc/netplan/network.yaml
|
|
||||||
netfile=/etc/netplan/network.yaml
|
netfile=/etc/netplan/network.yaml
|
||||||
elif [ -f /etc/network/interfaces ]; then
|
elif [ -f /etc/network/interfaces ]; then
|
||||||
cat /etc/network/interfaces
|
|
||||||
netfile=/etc/network/interfaces
|
netfile=/etc/network/interfaces
|
||||||
else
|
else
|
||||||
echo -e "No network configs found\n"
|
echo -e "No network configs found\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo
|
|
||||||
|
# cat ${netfile}
|
||||||
|
# echo
|
||||||
|
|
||||||
chmod 0600 ${netfile}
|
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
|
case "$choice" in
|
||||||
[Nn])
|
[Nn])
|
||||||
echo -e "${Green}The DNS servers have NOT been updated${Color_Off}"
|
echo -e "${Green}The DNS servers have NOT been updated${Color_Off}"
|
||||||
|
|||||||
Reference in New Issue
Block a user