From 863153da78ccb16c050a1c5433370df83da5b259 Mon Sep 17 00:00:00 2001 From: Jamo <71354459+Jamo-Tech@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:55:02 +0000 Subject: [PATCH] Update dns_jamotech.sh --- dnsapi/dns_jamotech.sh | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/dnsapi/dns_jamotech.sh b/dnsapi/dns_jamotech.sh index 8b14d55e..60b9b0d4 100644 --- a/dnsapi/dns_jamotech.sh +++ b/dnsapi/dns_jamotech.sh @@ -1,17 +1,14 @@ #!/usr/bin/env sh -#Here is a sample custom api script. -#This file name is "dns_myapi.sh" -#So, here must be a method dns_myapi_add() -#Which will be called by acme.sh to add the txt record to your api system. -#returns 0 means success, otherwise error. -# -#Author: Neilpang -#Report Bugs here: https://github.com/acmesh-official/acme.sh -# -######## Public functions ##################### - -# Please Read this guide first: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Dev-Guide +# JamoTech Customer Domain amce Helper +# This script is intended to be run via +# acme.sh on managed customer systems +# to allow customers to create and renew +# SSL certificates on their client +# subdomain e.g (client.jamo.tech) +# without the need for support staff +# to create TXT records. + # API Calls to be made # _get("https://api.corp-jamo.tech/dns/v1/records/exists.php?access=accesskey&hostname=subdomain&target=10.8.0.1&type=A") @@ -21,7 +18,6 @@ # _get("https://api.corp-jamo.tech/dns/v1/records/remove.php?access=accesskey&hostname=subdomain&target=10.8.0.1&type=A") # _get("https://api.corp-jamo.tech/dns/v1/records/remove.php?access=accesskey&hostname=_acme-challenge.subdomain&target=ACMEKEY&type=TXT") -#Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" dns_jamotech_add() { fulldomain=$1 txtvalue=$2 @@ -49,8 +45,6 @@ dns_jamotech_add() { } -#Usage: fulldomain txtvalue -#Remove the txt record after validation. dns_jamotech_rm() { fulldomain=$1 txtvalue=$2 @@ -81,11 +75,6 @@ dns_jamotech_rm() { } #################### Private functions below ################################## -# _acme-challenge.www.domain.com -# returns -# _domain=domain.com -# _txtdomain=_acme-challenge.www -# _adomain=www _get_root() { domain=$fulldomain