You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

9 years ago
9 years ago
6 years ago
9 years ago
8 years ago
8 years ago
  1. #!/usr/bin/env sh
  2. # shellcheck disable=SC2034
  3. dns_myapi_info='Custom API Example
  4. A sample custom DNS API script description.
  5. Domains: example.com example.net
  6. Site: github.com/acmesh-official/acme.sh/wiki/DNS-API-Dev-Guide
  7. Docs: github.com/acmesh-official/acme.sh/wiki/dnsapi2#dns_myapi
  8. Options:
  9. MYAPI_Token API Token. Get API Token from https://example.com/api/
  10. MYAPI_Variable2 Option 2. Default "default value".
  11. MYAPI_Variable2 Option 3. Optional.
  12. Issues: github.com/acmesh-official/acme.sh
  13. Author: Neil Pang <neilgit@neilpang.com>
  14. '
  15. #This file name is "dns_myapi.sh"
  16. #So, here must be a method dns_myapi_add()
  17. #Which will be called by acme.sh to add the txt record to your api system.
  18. #returns 0 means success, otherwise error.
  19. ######## Public functions #####################
  20. # Please Read this guide first: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Dev-Guide
  21. #Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
  22. dns_myapi_add() {
  23. fulldomain=$1
  24. txtvalue=$2
  25. _info "Using myapi"
  26. _debug fulldomain "$fulldomain"
  27. _debug txtvalue "$txtvalue"
  28. _err "Not implemented!"
  29. return 1
  30. }
  31. #Usage: fulldomain txtvalue
  32. #Remove the txt record after validation.
  33. dns_myapi_rm() {
  34. fulldomain=$1
  35. txtvalue=$2
  36. _info "Using myapi"
  37. _debug fulldomain "$fulldomain"
  38. _debug txtvalue "$txtvalue"
  39. }
  40. #################### Private functions below ##################################