mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Fix configurator restart
This commit is contained in:
parent
98e70df5e4
commit
402eadd208
1 changed files with 12 additions and 10 deletions
|
|
@ -1001,21 +1001,23 @@ LogLevel warn \n\
|
|||
"""
|
||||
#TODO: This should be written to use the process returncode
|
||||
try:
|
||||
p = ''
|
||||
if quiet:
|
||||
p = subprocess.Popen(['/etc/init.d/apache2', 'restart'], stdout=subprocess.PIPE, stderr=open("/dev/null", 'w')).communicate()[0]
|
||||
else:
|
||||
p = subprocess.Popen(['/etc/init.d/apache2', 'restart'], stderr=subprocess.PIPE).communicate()[0]
|
||||
p = subprocess.Popen(['/etc/init.d/apache2', 'restart'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
|
||||
text = p.communicate()
|
||||
|
||||
|
||||
if p.returncode != 0:
|
||||
# Enter recovery routine...
|
||||
logger.error("Configtest failed")
|
||||
logger.error(text[0])
|
||||
logger.error(text[1])
|
||||
return False
|
||||
|
||||
if "fail" in p:
|
||||
logger.error("Apache configuration is incorrect")
|
||||
logger.error(p)
|
||||
return False
|
||||
return True
|
||||
except:
|
||||
logger.fatal("Apache Restart Failed - Please Check the Configuration")
|
||||
sys.exit(1)
|
||||
|
||||
return True
|
||||
|
||||
def __add_httpd_transform(self, incl):
|
||||
"""
|
||||
This function will correctly add a transform to augeas
|
||||
|
|
|
|||
Loading…
Reference in a new issue