Update update-dns.sh
This commit is contained in:
@@ -8,8 +8,12 @@ fi
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
read -n 1 -p "Do you wish to continue changing the DNS? (Y/n) " choice
|
read -n 1 -p "Do you wish to continue changing the DNS? (Y/n) " choice
|
||||||
|
echo
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
[Nn]) exit 0; ;;
|
[Nn])
|
||||||
|
echo -e "${Green}The DNS servers have NOT been updated${Color_Off}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
* ) if [ -f /etc/netplan/eth0.yaml ]; then
|
* ) if [ -f /etc/netplan/eth0.yaml ]; then
|
||||||
sed -i 's/10.5.10.5,10.10.10.10/10.10.10.10,10.10.10.11/g' /etc/netplan/eth0.yaml
|
sed -i 's/10.5.10.5,10.10.10.10/10.10.10.10,10.10.10.11/g' /etc/netplan/eth0.yaml
|
||||||
@@ -31,7 +35,9 @@ case "$choice" in
|
|||||||
/usr/sbin/service networking restart
|
/usr/sbin/service networking restart
|
||||||
|
|
||||||
cat /etc/network/interfaces
|
cat /etc/network/interfaces
|
||||||
fi;;
|
fi
|
||||||
|
echo -e "${Green}The DNS servers have been updated${Color_Off}"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user