mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 18:04:31 +02:00
Merge pull request #375 from kuba/apache-no-sudo
Don't use sudo in apache plugin
This commit is contained in:
@@ -908,7 +908,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
["sudo", self.config.apache_ctl, "configtest"], # TODO: sudo?
|
[self.config.apache_ctl, "configtest"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
stdout, stderr = proc.communicate()
|
stdout, stderr = proc.communicate()
|
||||||
@@ -1046,7 +1046,7 @@ def enable_mod(mod_name, apache_init_script, apache_enmod):
|
|||||||
try:
|
try:
|
||||||
# Use check_output so the command will finish before reloading
|
# Use check_output so the command will finish before reloading
|
||||||
# TODO: a2enmod is debian specific...
|
# TODO: a2enmod is debian specific...
|
||||||
subprocess.check_call(["sudo", apache_enmod, mod_name], # TODO: sudo?
|
subprocess.check_call([apache_enmod, mod_name],
|
||||||
stdout=open("/dev/null", "w"),
|
stdout=open("/dev/null", "w"),
|
||||||
stderr=open("/dev/null", "w"))
|
stderr=open("/dev/null", "w"))
|
||||||
apache_restart(apache_init_script)
|
apache_restart(apache_init_script)
|
||||||
|
|||||||
Reference in New Issue
Block a user