This DNS01 method allows acme.sh to set DNS TXT records using the Plesk XML API described at:
https://docs.plesk.com/en-US/12.5/api-rpc/about-xml-api.28709
and more specifically:
https://docs.plesk.com/en-US/12.5/api-rpc/reference.28784
This may be needed if the DNS provider doesn't make the standard Plesk API available to a user - in which case, Plesk can't be configured using usual means or RFC1236. But the XML API is often still left accessible, and is well documented, so it can be used instead, for acme.sh purposes.
Note that I have tested the API calls work as expected, and is sanely structured, but I'm not an experienced shell coder. So I expect any number of stylistic and other amendments/corrections. It also includes a ton of debug code which won't hurt to leave in while checking.
Please help me to knock this module into shape for merging, and be gentle with me on it - I'm sure it needs a lot of attention!
Thanks :)
date -u -d@"12345" does not produce an error on *BSD and outputs the
current date in UTC, which is not the expected output from _time2str()
Fix, reorder _time2str() to attempt BSD style date first, which
errors on Linux, so cascade style OS detection works correctly.
Eliminated php dependency with a private function for urlencode using sed. Php had failed on godaddy due to multiple php instances and naturally cron using the one without the necessary -r option. Compared to previous PR the sed code is now POSIX and should work on all environments.
HAProxy requires the certificate chain and key to be concatenated and placed somewhere (can be anywhere). This script expects a single environment variable with the path where the concatenated PEM file should be written