|
@@ -14,7 +14,7 @@ import logging
|
|
import json
|
|
import json
|
|
import sys
|
|
import sys
|
|
|
|
|
|
-from amulib.cert_path_provider import AcmeToolCertPathProvider
|
|
|
|
|
|
+from amulib.cert_path_provider import AcmeToolCertPathProvider, GetSslCertPathProvider
|
|
from amulib.helpers import get_log_level
|
|
from amulib.helpers import get_log_level
|
|
from amulib import apache
|
|
from amulib import apache
|
|
from amulib import postfix
|
|
from amulib import postfix
|
|
@@ -79,12 +79,17 @@ def set_log_level(args, config, logger):
|
|
|
|
|
|
|
|
|
|
def create_cert_path_provider(cert_path_provider, config, logger):
|
|
def create_cert_path_provider(cert_path_provider, config, logger):
|
|
- if "acme_tool" in config and config["acme_tool"] == "acmetool":
|
|
|
|
- cert_path_provider = AcmeToolCertPathProvider(config["acme_dir"])
|
|
|
|
|
|
+ if "acme_tool" in config:
|
|
|
|
+ if config["acme_tool"] == "acmetool":
|
|
|
|
+ return AcmeToolCertPathProvider(config["acme_dir"])
|
|
|
|
+ elif config["acme_tool"] == "getssl":
|
|
|
|
+ return GetSslCertPathProvider(config["acme_dir"])
|
|
|
|
+ else:
|
|
|
|
+ logger.error("Invalid acme tooling specified")
|
|
|
|
+ sys.exit(1)
|
|
else:
|
|
else:
|
|
- logger.error("Invalid acme tooling specified")
|
|
|
|
|
|
+ logger.error("No acme tooling specified in configuration")
|
|
sys.exit(1)
|
|
sys.exit(1)
|
|
- return cert_path_provider
|
|
|
|
|
|
|
|
|
|
|
|
def execute_services(args, cert_path_provider, config):
|
|
def execute_services(args, cert_path_provider, config):
|