aaff-se / dehydrated-loopia-api-hook

DNS challenge hook for automatic renewal of Letsencrypt wildcard certificates through the Loopia API
3 stars 1 forks source link

Hook for sub-domains #1

Open jobarne opened 5 years ago

jobarne commented 5 years ago

Great work having adopted the hook for Loopia. I understand it does not work for subdomain in its present form. My coding ability does not enable me to do the necessary changes. Would it be hard to adopt the code?

aaff-se commented 5 years ago

Good question. If you'll only get one certificate for one domain, you could substitute "_acme-challenge" with "_acme-challenge.[yourSubDomain]" on lines 154, 162 & 174, which should work with Loopia. The obvious drawback would be that a hard-coded subdomain would be used for all domains set in the dehydrated config file..

It should also be possible to use an if-statement similar to the one that is used in the original script that I adapted, (line 90 to 103). That way you break out any sub domain set in in the dehydrated config file. Although I'm not sure how Loopia will react to a possible trailing dot in the subdomain-field. But why not give it a try and see!