On Fri, 4 Dec 2015 00:23:53 -0700 Mela Luca <[email protected]> wrote:
> I am looking to automate letsencrypt with lua, the process would be to detect > to see if the domain has a cert already, if not it would execute letsencrypt > on the domain. > Any thought if this would be possible to do with lua. I am guessing using the > os.execute. > I'm not sure that you're using the good way to do this: - I don't known letsencrypt very well, but I heard that the letsecncrypt framework expect a confirmation that the requester is the real owner of the web site. It requires to the owner to add a special webpage at a special url. So the process is very slow and it cannot done during an http request timing. - os.execute() is a blocking action. While HAProxy is waiting for the script response, it does nothing, and all the traffic is blocked. Actuelly, the Lua in HAProxy only communicates with other process with the Socket provided by the Lua/HAProxy API. Thierry

