_regru_rest POST "zone/add_txt""input_data={%22username%22:%22${REGRU_API_Username}%22,%22password%22:%22${REGRU_API_Password}%22,%22domains%22:[{%22dname%22:%22${_domain}%22}],%22subdomain%22:%22_acme-challenge%22,%22text%22:%22${txtvalue}%22,%22output_content_type%22:%22plain%22}&input_format=json"
if _contains "${response}"'success';then
if! _contains "${response}"'error';then
return0
return0
fi
fi
_err "Could not create resource record, check logs"
_err "Could not create resource record, check logs"
_regru_rest POST "zone/remove_record""input_data={%22username%22:%22${REGRU_API_Username}%22,%22password%22:%22${REGRU_API_Password}%22,%22domains%22:[{%22dname%22:%22${_domain}%22}],%22subdomain%22:%22_acme-challenge%22,%22content%22:%22${txtvalue}%22,%22record_type%22:%22TXT%22,%22output_content_type%22:%22plain%22}&input_format=json"
if _contains "${response}"'success';then
if! _contains "${response}"'error';then
return0
return0
fi
fi
_err "Could not delete resource record, check logs"
_err "Could not delete resource record, check logs"