diff --git a/README.md b/README.md index 4d3412a..f1fb0b3 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,15 @@ The DNS update requests are retried in the background (XXX: currently blocks for -v, --verbose --watch Watch for interface changes -i, --interface=IFACE Use address from interface - --interface-family=ipv4|ipv6|all - --server=HOST[:PORT] - --timeout=DURATION - --retry=DURATION + --interface-family=ipv4|ipv6|all Limit to interface addreses of given family + --server=HOST[:PORT] Server for UPDATE query, default is discovered from zone SOA + --timeout=DURATION Timeout for sever queries (default: 10s) + --retry=DURATION Retry interval, increased for each retry attempt (default: 30s) --tsig-name=FQDN - --tsig-secret=BASE-64 + --tsig-secret=BASE-64 base64-encoded shared TSIG secret key [$TSIG_SECRET] --tsig-algorithm=hmac-{md5,sha1,sha256,sha512} - --zone=FQDN Zone to update - --ttl=DURATION + --zone=FQDN Zone to update, default is derived from name + --ttl=DURATION TTL for updated records (default: 60s) Help Options: -h, --help Show this help message @@ -36,6 +36,7 @@ The DNS update requests are retried in the background (XXX: currently blocks for Arguments: Name: DNS Name to update + ## Example # Using a generated TSIG key: diff --git a/main.go b/main.go index 5b1de11..6cc5b0c 100644 --- a/main.go +++ b/main.go @@ -12,20 +12,20 @@ type Options struct { Watch bool `long:"watch" description:"Watch for interface changes"` Interface string `long:"interface" short:"i" value-name:"IFACE" description:"Use address from interface"` - InterfaceFamily Family `long:"interface-family" value-name:"ipv4|ipv6|all"` + InterfaceFamily Family `long:"interface-family" value-name:"ipv4|ipv6|all" description:"Limit to interface addreses of given family"` - Server string `long:"server" value-name:"HOST[:PORT]"` - Timeout time.Duration `long:"timeout" value-name:"DURATION" default:"10s"` - Retry time.Duration `long:"retry" value-name:"DURATION" default:"30s"` + Server string `long:"server" value-name:"HOST[:PORT]" description:"Server for UPDATE query, default is discovered from zone SOA"` + Timeout time.Duration `long:"timeout" value-name:"DURATION" default:"10s" description:"Timeout for sever queries"` + Retry time.Duration `long:"retry" value-name:"DURATION" default:"30s" description:"Retry interval, increased for each retry attempt"` TSIGName string `long:"tsig-name" value-name:"FQDN"` - TSIGSecret string `long:"tsig-secret" value-name:"BASE-64" env:"TSIG_SECRET"` + TSIGSecret string `long:"tsig-secret" value-name:"BASE-64" env:"TSIG_SECRET" description:"base64-encoded shared TSIG secret key"` TSIGAlgorithm TSIGAlgorithm `long:"tsig-algorithm" value-name:"hmac-{md5,sha1,sha256,sha512}" default:"hmac-sha1."` - Zone string `long:"zone" value-name:"FQDN" description:"Zone to update"` - TTL time.Duration `long:"ttl" value-name:"DURATION" default:"60s"` + Zone string `long:"zone" value-name:"FQDN" description:"Zone to update, default is derived from name"` + TTL time.Duration `long:"ttl" value-name:"DURATION" default:"60s" description:"TTL for updated records"` Args struct { - Name string `description:"DNS Name to update"` + Name string `value-name:"FQDN" description:"DNS Name to update"` } `positional-args:"yes"` }