#!/bin/bash
resolv=`cat /etc/resolv.conf`
for dns in '172'
do
    #echo $resolv - $dns
	if [[ $resolv == *$dns* ]]
	then
		echo 'nameserver 1.0.0.1' > /etc/resolv.conf
		date +"%Y-%m-%d %H:%M:%S"
		exit 0
	fi
done