diff options
| author | Shulhan <ms@kilabit.info> | 2022-05-15 22:57:26 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-05-15 22:57:26 +0700 |
| commit | f21e7c468c4d4479919c4a483451c6672698ab0a (patch) | |
| tree | de450231be1c96eeb8161f2844baa3879de8b515 /cmd/resolver/main.go | |
| parent | fe92d71726313f54ea91980d40c8ef52872ac1f2 (diff) | |
| download | rescached-f21e7c468c4d4479919c4a483451c6672698ab0a.tar.xz | |
cmd/resolver: implement command to add new record to zone
The command has the following signature,
zone.d rr add <zone> <"@" | subdomain> <ttl> <type> <class> <value> ...::
The domain name can be set to origin using "@" or empty string, subdomain
(without ending with "."), or fully qualified domain name (end with ".").
If ttl is set to 0, it will default to 604800 (7 days).
List of valid type are A, NS, CNAME, PTR, MX, TXT, and AAAA.
List of valid class are IN, CS, HS.
Diffstat (limited to 'cmd/resolver/main.go')
| -rw-r--r-- | cmd/resolver/main.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cmd/resolver/main.go b/cmd/resolver/main.go index 62af801..556cff1 100644 --- a/cmd/resolver/main.go +++ b/cmd/resolver/main.go @@ -148,7 +148,7 @@ query <domain / ip-address> [type] [class] Valid type are either A, NS, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO, MINFO, MX, TXT, AAAA, or SRV. - Default value is A." + Default value is A. Valid class are either IN, CS, HS. Default value is IN. @@ -246,6 +246,20 @@ zone.d delete <name> Delete zone file inside the zone.d directory. +=== MANAGING RECORD IN ZONE.D + +zone.d rr add <zone> <domain> <ttl> <type> <class> <value> ... + + Add new record into the zone file. + If domain ttl is set to 0, it will default to 604800 (7 days). + List of valid type are A, NS, CNAME, PTR, MX, TXT, and AAAA. + The value parameter can be more than one, for example, the MX record + we pass two parameters: + + <pref> <exchange> + + See the example below for more information. + == Examples === QUERY |
