dns_myapi.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env sh
  2. #Here is a sample custom api script.
  3. #This file name is "dns_myapi.sh"
  4. #So, here must be a method dns_myapi_add()
  5. #Which will be called by acme.sh to add the txt record to your api system.
  6. #returns 0 means success, otherwise error.
  7. #
  8. #Author: Neilpang
  9. #Report Bugs here: https://github.com/Neilpang/acme.sh
  10. #
  11. ######## Public functions #####################
  12. # Please Read this guide first: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
  13. #Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
  14. dns_myapi_add() {
  15. fulldomain=$1
  16. txtvalue=$2
  17. _info "Using myapi"
  18. _debug fulldomain "$fulldomain"
  19. _debug txtvalue "$txtvalue"
  20. _err "Not implemented!"
  21. return 1
  22. }
  23. #Usage: fulldomain txtvalue
  24. #Remove the txt record after validation.
  25. dns_myapi_rm() {
  26. fulldomain=$1
  27. txtvalue=$2
  28. _info "Using myapi"
  29. _debug fulldomain "$fulldomain"
  30. _debug txtvalue "$txtvalue"
  31. }
  32. #################### Private functions below ##################################