mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Changed define and version commands from string to list to avoid unneeded parsing later on
This commit is contained in:
parent
c29c6c96ae
commit
c728219bc9
3 changed files with 8 additions and 8 deletions
|
|
@ -1343,7 +1343,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
"""
|
||||
try:
|
||||
stdout, _ = le_util.run_script(
|
||||
constants.os_constant("version_cmd").split(" "))
|
||||
constants.os_constant("version_cmd"))
|
||||
except errors.SubprocessError:
|
||||
raise errors.PluginError(
|
||||
"Unable to run %s -v" % self.conf("ctl"))
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ CLI_DEFAULTS_DEBIAN = dict(
|
|||
server_root="/etc/apache2",
|
||||
vhost_root="/etc/apache2/sites-available",
|
||||
ctl="apache2ctl",
|
||||
version_cmd="apache2ctl -v",
|
||||
define_cmd="apache2ctl -t -D DUMP_RUN_CFG",
|
||||
version_cmd=['apache2ctl', '-v'],
|
||||
define_cmd=['apache2ctl', '-t', '-D', 'DUMP_RUN_CFG'],
|
||||
enmod="a2enmod",
|
||||
dismod="a2dismod",
|
||||
le_vhost_ext="-le-ssl.conf",
|
||||
|
|
@ -20,8 +20,8 @@ CLI_DEFAULTS_CENTOS = dict(
|
|||
server_root="/etc/httpd",
|
||||
vhost_root="/etc/httpd/conf.d",
|
||||
ctl="apachectl",
|
||||
version_cmd="apachectl -v",
|
||||
define_cmd="apachectl -t -D DUMP_RUN_CFG",
|
||||
version_cmd=['apachectl', '-v'],
|
||||
define_cmd=['apachectl', '-t', '-D', 'DUMP_RUN_CFG'],
|
||||
enmod=None,
|
||||
dismod=None,
|
||||
le_vhost_ext="-le-ssl.conf",
|
||||
|
|
@ -33,8 +33,8 @@ CLI_DEFAULTS_GENTOO = dict(
|
|||
server_root="/etc/apache2",
|
||||
vhost_root="/etc/apache2/vhosts.d",
|
||||
ctl="apache2ctl",
|
||||
version_cmd="/usr/sbin/apache2 -v",
|
||||
define_cmd="/usr/sbin/apache2 -t -D DUMP_RUN_CFG",
|
||||
version_cmd=['/usr/sbin/apache2', '-v'],
|
||||
define_cmd=['/usr/sbin/apache2', '-t', '-D', 'DUMP_RUN_CFG'],
|
||||
enmod=None,
|
||||
dismod=None,
|
||||
le_vhost_ext="-le-ssl.conf",
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class ApacheParser(object):
|
|||
"""
|
||||
try:
|
||||
proc = subprocess.Popen(
|
||||
constants.os_constant("define_cmd").split(" "),
|
||||
constants.os_constant("define_cmd"),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
|
|
|
|||
Loading…
Reference in a new issue