Commit Graph

9 Commits (e8e6feeb0ffd273c20328bfa11a36f3f916c997a)

Author SHA1 Message Date
Miodrag Tokić aec9c3c9a4 Double quote unquoted variables
Double quote unquoted variables to prevent globbing and word splitting.
Miodrag Tokić 0daa225e26 Make the Loopia API endpoint configurable
Loopia provides hosting in several countries. Each hosting location has
it's own API endpoint, such as "https://api.loopia.<TLD>/RPCSERV", where
<TLD> is one of: com, no, rs, se.

The current LOOPIA_Api variable is hard-coded to ".se". This prevents
using the Loopia DNS API on other hosting locations.

This commit makes the LOOPIA_Api variable configurable and it falls back
to ".se" TLD if LOOPIA_Api is not set.

References:

 - https://www.loopia.com/api/authentication/
 - https://www.loopia.no/api/authentication/
 - https://www.loopia.rs/api/authentication/
 - https://www.loopia.se/api/authentication/
Miodrag Tokić 85be2b85fd Fix error message language
Miodrag Tokić a7d6146169 Extract configuration saving code to function
Miodrag Tokić 978ec91107 Extract configuration loading code to function
Marton Szucs 40f0238bb7 fix dns_loopia wildcard certificate
Checks if a subdomain already exists before creating one. The loopia API clears all records for a subdomain when adding it again.

Adding TXT-records instead of updating the existing record when using the add method. Wildcard certificates require multiple TXT-records for the same subdomain. 

Now you can create wildcard certificates using:
 `acme.sh  --issue -d example.com  -d '*.example.com'  --dns dns_loopia`
Double quoting variables
Ivar Larsson 8995d3434f _contains instead of echo
Ivar Larsson 413f071861 use echo
Ivar Larsson cac3b3ea35 add dns_loopia