rfc2136: add command example (#1321)

* RFC2136 example

This small patch adds an example to the RFC2136 provider.

* review and generate.

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
JP Mens 2020-12-19 16:48:31 +01:00 committed by GitHub
parent af597bac81
commit dfdc625f8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 4 deletions

View file

@ -18,9 +18,25 @@ Configuration for [RFC2136](https://tools.ietf.org/html/rfc2136).
- Code: `rfc2136` - Code: `rfc2136`
{{% notice note %}} Here is an example bash command using the RFC2136 provider:
_Please contribute by adding a CLI example._
{{% /notice %}} ```bash
RFC2136_NAMESERVER=127.0.0.1 \
RFC2136_TSIG_KEY=lego \
RFC2136_TSIG_ALGORITHM=hmac-sha256. \
RFC2136_TSIG_SECRET=YWJjZGVmZGdoaWprbG1ub3BxcnN0dXZ3eHl6MTIzNDU= \
lego --email myemail@example.com --dns rfc2136 --domains my.example.org run
## ---
keyname=lego; keyfile=lego.key; tsig-keygen $keyname > $keyfile
RFC2136_NAMESERVER=127.0.0.1 \
RFC2136_TSIG_KEY="$keyname" \
RFC2136_TSIG_ALGORITHM="$( awk -F'[ ";]' '/algorithm/ { print $2 }' $keyfile )." \
RFC2136_TSIG_SECRET="$( awk -F'[ ";]' '/secret/ { print $3 }' $keyfile )" \
lego --email myemail@example.com --dns rfc2136 --domains my.example.org run
```

View file

@ -4,7 +4,23 @@ URL = "https://tools.ietf.org/html/rfc2136"
Code = "rfc2136" Code = "rfc2136"
Since = "v0.3.0" Since = "v0.3.0"
Example = '''''' Example = '''
RFC2136_NAMESERVER=127.0.0.1 \
RFC2136_TSIG_KEY=lego \
RFC2136_TSIG_ALGORITHM=hmac-sha256. \
RFC2136_TSIG_SECRET=YWJjZGVmZGdoaWprbG1ub3BxcnN0dXZ3eHl6MTIzNDU= \
lego --email myemail@example.com --dns rfc2136 --domains my.example.org run
## ---
keyname=lego; keyfile=lego.key; tsig-keygen $keyname > $keyfile
RFC2136_NAMESERVER=127.0.0.1 \
RFC2136_TSIG_KEY="$keyname" \
RFC2136_TSIG_ALGORITHM="$( awk -F'[ ";]' '/algorithm/ { print $2 }' $keyfile )." \
RFC2136_TSIG_SECRET="$( awk -F'[ ";]' '/secret/ { print $3 }' $keyfile )" \
lego --email myemail@example.com --dns rfc2136 --domains my.example.org run
'''
[Configuration] [Configuration]
[Configuration.Credentials] [Configuration.Credentials]