Browse Source

adding wrapper script for lexicon dns manipulation

pull/174/merge
srvrco 9 years ago
parent
commit
0922e280d5
2 changed files with 36 additions and 0 deletions
  1. +18
    -0
      dns_scripts/dns_add_lexicon
  2. +18
    -0
      dns_scripts/dns_del_lexicon

+ 18
- 0
dns_scripts/dns_add_lexicon View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# a simple wrapper for Lexicon - https://github.com/AnalogJ/lexicon - a python script which can
# Manipulate DNS records on various DNS providers in a standardized way.
# You need to define the following environmental variables
# LEXICON_PROVIDER
# Every DNS service and auth flag maps to an Environmental Variable as follows: LEXICON_{DNS Provider Name}_{Auth Type}
# eg LEXICON_CLOUDFLARE_USERNAME and LEXICON_CLOUDFLARE_TOKEN or LEXICON_DIGITALOCEAN_TOKEN
fulldomain="${1}"
token="${2}"
lexicon "$LEXICON_PROVIDER" \
create "$fulldomain" TXT \
--name="_acme-challenge.${fulldomain}." \
--content="$token"
exit

+ 18
- 0
dns_scripts/dns_del_lexicon View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# a simple wrapper for Lexicon - https://github.com/AnalogJ/lexicon - a python script which can
# Manipulate DNS records on various DNS providers in a standardized way.
# You need to define the following environmental variables
# LEXICON_PROVIDER
# Every DNS service and auth flag maps to an Environmental Variable as follows: LEXICON_{DNS Provider Name}_{Auth Type}
# eg LEXICON_CLOUDFLARE_USERNAME and LEXICON_CLOUDFLARE_TOKEN or LEXICON_DIGITALOCEAN_TOKEN
fulldomain="${1}"
token="${2}"
lexicon "$LEXICON_PROVIDER" \
delete "$fulldomain" TXT \
--name="_acme-challenge.${fulldomain}." \
--content="$token"
exit

Loading…
Cancel
Save