I have a script that I want to use to update google DNS for my domain. The username, password, domain, etc for the DNS update are lines in a txt file. I am reading it into an array and setting variables in the command to send to Google. For some reason the variable localip has or will not read the correct line in the txt file. It doesn't change with an change in the txt file.

Code:
Function_dnsupdate ()
{
mapfile -t array <config.txt
domain="${array[0]}" 
username="${array[1]}"
password="${array[2]}"
peer="${array[3]}"
localip="${array[4]}"
failoverip="${array[5]}"
location="${array[6]}"
dealer="${array[7]}"
email="${array[8]}"

ipupdate=$(curl -s https://$username:$password@domains.google.com/nic/update?hostname=$domain&myip=$localip)
echo $ipupdate
echo $localip



Function_dnsupdate
When I run the script I get a no change back from Google. For instance the existing DNS entry is 45.45.45.46 and I want to input 66.66.66.78 I change the config.txt file and run the script and I get back nochg 66.66.66.78 instead of good 45.45.45.46

I even tried to manually enter the ip at the end of the google update command, all failing.

What can I do to get this working?

TIA