#!/bin/bash echo "HERE: ${1}" # if [ -d /opt/idssys/defaults ]; then # source /opt/idssys/defaults/colors.inc # source /opt/idssys/defaults/default.inc # else # source /dev/stdin <<< "$(curl -sL http://go.scity.us/colorsinc)" # source /dev/stdin <<< "$(curl -sL http://go.scity.us/defaultinc)" # fi # # if [ -f /etc/netplan/eth0.yaml ]; then # cat /etc/netplan/eth0.yaml # else # cat /etc/network/interfaces # fi # echo # # read -n 1 -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}" # exit 0 # ;; # # * ) if [ -f /etc/netplan/eth0.yaml ]; then # sed -i 's/10.10.10.10,10.10.10.11/10.10.10.10,10.10.10.11,10.2.1.2/g' /etc/netplan/eth0.yaml # # /usr/sbin/netplan apply # # cat /etc/netplan/eth0.yaml # else # sed -i 's/10.10.10.10 10.10.10.11/10.10.10.10 10.10.10.11 10.2.1.2/g' /etc/network/interfaces # # /usr/sbin/service networking restart # # cat /etc/network/interfaces # fi # echo -e "${Green}The DNS servers have been updated${Color_Off}" # ;; # esac echo exit 0