mirror of
https://github.com/certbot/certbot.git
synced 2026-02-20 08:20:44 -05:00
In https://github.com/certbot/certbot/pull/8748#discussion_r605457670 we discussed about changing the dict used to set OS options for Apache configurators into a dedicated object. * Create _OsOptions class to configure the os specific options of the Apache configurators * Fix tests * Clean imports * Fix naming * Fix compatibility tests * Rename a class * Ensure restart_cmd_alt is set for specific OSes. * Add docstring * Fix override * Fix coverage
23 lines
776 B
Python
23 lines
776 B
Python
""" Distribution specific override class for OpenSUSE """
|
|
import zope.interface
|
|
|
|
from certbot import interfaces
|
|
from certbot_apache._internal import configurator
|
|
from certbot_apache._internal.configurator import OsOptions
|
|
|
|
|
|
@zope.interface.provider(interfaces.IPluginFactory)
|
|
class OpenSUSEConfigurator(configurator.ApacheConfigurator):
|
|
"""OpenSUSE specific ApacheConfigurator override class"""
|
|
|
|
OS_DEFAULTS = OsOptions(
|
|
vhost_root="/etc/apache2/vhosts.d",
|
|
vhost_files="*.conf",
|
|
ctl="apachectl",
|
|
version_cmd=['apachectl', '-v'],
|
|
restart_cmd=['apachectl', 'graceful'],
|
|
conftest_cmd=['apachectl', 'configtest'],
|
|
enmod="a2enmod",
|
|
dismod="a2dismod",
|
|
challenge_location="/etc/apache2/vhosts.d",
|
|
)
|