custom script for saving a dns zone

Version 1.232

Feature
Finished

/usr/local/directadmin/scripts/custom/dns_write_post.sh environmental variables: A : list of a records CNAME : list of cname records MX : list of mx records NS : list of ns records PTR : list of ptr records SERIAL : the serial used in the zone EMAIL : authoritative email NS1 : authoritative ns zone. DOMAIN : domain name of the zone SERVER_IP : server IP A_TIME : ttl for A records CNAME_TIME : ttl for CNAME records NS_TIME : ttl for NS records PTR_TIME : ttl for PTR records ----- Newer versions DirectAdmin may include (depending on dns_*= settings in directadmin.conf) TXT, TIME_TIME, AAAA, AAAA_TIME, SRV, SRV_TIME, SPF, SPF_TIME, TLSA, TLSA_TIME, CAA, CAA_TIME, DS, DS_TIME, MX_FULL, MX_TIME. You should use MX_FULL and not MX, as MX does not include the "left side" value. See this entry for MX_FULL examples: https://www.directadmin.com/features.php?id=1497 ----- A, CNAME, MX, NS and PTR will be url encoded arrays: eg: A: A=ftp=192.168.0.2&localhost=127.0.0.1&mail=192.168.0.2&domain.com.=192.168.0.2&webmail=192.168.0.2&www=192.168.0.2 a non zero return value from the script will output and text from stdout to the interface. In cases where writing the dns is only a part of the whole action (eg: creating a User or new domain), aborting the script with a non-zero could prevent further actions from happening.

Interested to try DirectAdmin? Get a 30-day Free Trial!