I'm using instructions (http://www.directadmin.com/features.php?id=450) but I'm stuck with my script.
The TXT entries are in url encoded arrays:
TXT=domain.com.="v=spf1 a mx ip4:15.16.17.18 ~all"&domain.com.=test
I'm using:
The loop return:
and
Now I'm trying again to explode first element in array but I cant becouse there are more than one "="
1. How to explode this or where to change default separator "=" to somethin more uniqe like "::"
2. Why the varible SRV is always empty ?
The TXT entries are in url encoded arrays:
TXT=domain.com.="v=spf1 a mx ip4:15.16.17.18 ~all"&domain.com.=test
I'm using:
Code:
TXTS=(`echo $TXT | tr "&" "\n"`)
if [ ${#TXTS[@]} > 0 ]; then
for a in "${TXT[@]}"
do
${TXT[0]} >> /tmp/defaultdns
${TXT[1]} >> /tmp/defaultdns
done
The loop return:
Code:
domain.com.="v=spf1 a mx ip4:15.16.17.18 ~all"
Code:
domain.com.=test
Now I'm trying again to explode first element in array but I cant becouse there are more than one "="
1. How to explode this or where to change default separator "=" to somethin more uniqe like "::"
2. Why the varible SRV is always empty ?