mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
If attempt to auto-restart service, reduce severity of result
Provide feedback as a warning rather than aborting the command entirely
This commit is contained in:
parent
4a3834b481
commit
4802c52854
@ -282,11 +282,17 @@ def initialize(cmdset):
|
||||
init_confluent_myname()
|
||||
certutil.create_certificate()
|
||||
if os.path.exists('/usr/lib/systemd/system/httpd.service'):
|
||||
subprocess.check_call(['systemctl', 'try-restart', 'httpd'])
|
||||
print('HTTP server has been restarted if it was running')
|
||||
try:
|
||||
subprocess.check_call(['systemctl', 'try-restart', 'httpd'])
|
||||
print('HTTP server has been restarted if it was running')
|
||||
except subprocess.CalledProcessError:
|
||||
emprint('New HTTPS certificates generated, restart the web server manually')
|
||||
elif os.path.exists('/usr/lib/systemd/system/apache2.service'):
|
||||
subprocess.check_call(['systemctl', 'try-restart', 'apache2'])
|
||||
print('HTTP server has been restarted if it was running')
|
||||
try:
|
||||
subprocess.check_call(['systemctl', 'try-restart', 'apache2'])
|
||||
print('HTTP server has been restarted if it was running')
|
||||
except subprocess.CalledProcessError:
|
||||
emprint('New HTTPS certificates generated, restart the web server manually')
|
||||
else:
|
||||
emprint('New HTTPS certificates generated, restart the web server manually')
|
||||
if cmdset.s:
|
||||
|
Loading…
Reference in New Issue
Block a user