]>
Commit | Line | Data |
---|---|---|
0a7c9364 | 1 | #!/usr/bin/env sh |
ab497961 | 2 | |
3 | #Here is a sample custom api script. | |
eccec5f6 | 4 | #This file name is "dns_myapi.sh" |
bf233fbd | 5 | #So, here must be a method dns_myapi_add() |
fb675223 | 6 | #Which will be called by acme.sh to add the txt record to your api system. |
bf233fbd | 7 | #returns 0 means success, otherwise error. |
eea52a5f | 8 | # |
9 | #Author: Neilpang | |
10 | #Report Bugs here: https://github.com/Neilpang/acme.sh | |
11 | # | |
ab497961 | 12 | ######## Public functions ##################### |
13 | ||
bf233fbd | 14 | #Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" |
eccec5f6 | 15 | dns_myapi_add() { |
ab497961 | 16 | fulldomain=$1 |
17 | txtvalue=$2 | |
eea52a5f | 18 | _info "Using myapi" |
19 | _debug fulldomain "$fulldomain" | |
20 | _debug txtvalue "$txtvalue" | |
ab497961 | 21 | _err "Not implemented!" |
4c2a3841 | 22 | return 1 |
ab497961 | 23 | } |
24 | ||
21f201e3 | 25 | #Usage: fulldomain txtvalue |
eea52a5f | 26 | #Remove the txt record afer validation. |
5d6fd809 | 27 | dns_myapi_rm() { |
28 | fulldomain=$1 | |
21f201e3 | 29 | txtvalue=$2 |
30 | _info "Using myapi" | |
31 | _debug fulldomain "$fulldomain" | |
32 | _debug txtvalue "$txtvalue" | |
5d6fd809 | 33 | } |
ab497961 | 34 | |
ab497961 | 35 | #################### Private functions bellow ################################## |