diff --git a/dns_scripts/dns_add_lexicon b/dns_scripts/dns_add_lexicon new file mode 100755 index 0000000..1cbab67 --- /dev/null +++ b/dns_scripts/dns_add_lexicon @@ -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 diff --git a/dns_scripts/dns_del_lexicon b/dns_scripts/dns_del_lexicon new file mode 100755 index 0000000..2d58720 --- /dev/null +++ b/dns_scripts/dns_del_lexicon @@ -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