_cf_rest PUT "zones/$_domain_id/dns_records/$record_id""{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}"
if["$?"="0"];then
...
...
@@ -91,8 +93,8 @@ _get_root() {
domain=$1
i=2
p=1
while['1'];do
h=$(printf$domain | cut-d.-f$i-100)
while true;do
h=$(printf"%s""$domain" | cut-d.-f$i-100)
if[-z"$h"];then
#not valid
return 1
...
...
@@ -102,17 +104,17 @@ _get_root() {
return 1
fi
if printf$response | grep\"name\":\"$h\">/dev/null;then
_LUA_rest PUT "zones/$_domain_id/records/$record_id""{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain.\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"ttl\":120}"
if["$?"="0"];then
...
...
@@ -95,24 +97,24 @@ _get_root() {
if! _LUA_rest GET "zones";then
return 1
fi
while['1'];do
h=$(printf$domain | cut-d.-f$i-100)
while true;do
h=$(printf"%s""$domain" | cut-d.-f$i-100)
if[-z"$h"];then
#not valid
return 1
fi
if printf$response | grep\"name\":\"$h\">/dev/null;then
_me_rest PUT "$_domain_id/records/$record_id/""{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"gtdLocation\":\"DEFAULT\",\"ttl\":120}"
if["$?"="0"];then
...
...
@@ -89,8 +91,8 @@ _get_root() {
domain=$1
i=2
p=1
while['1'];do
h=$(printf$domain | cut-d.-f$i-100)
while true;do
h=$(printf"%s""$domain" | cut-d.-f$i-100)
if[-z"$h"];then
#not valid
return 1
...
...
@@ -100,17 +102,17 @@ _get_root() {
return 1
fi
if printf$response | grep\"name\":\"$h\">/dev/null;then