summaryrefslogtreecommitdiffstats
path: root/install/restart_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'install/restart_scripts')
-rw-r--r--install/restart_scripts/renew_ra_cert10
-rw-r--r--install/restart_scripts/restart_dirsrv3
-rw-r--r--install/restart_scripts/restart_httpd3
3 files changed, 4 insertions, 12 deletions
diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert
index d71d6e2ac..40ef7289b 100644
--- a/install/restart_scripts/renew_ra_cert
+++ b/install/restart_scripts/renew_ra_cert
@@ -30,7 +30,6 @@ import traceback
from ipapython import ipautil
from ipalib import api
from ipaserver.install import certs, cainstance, krainstance
-from ipaplatform import services
from ipaplatform.paths import paths
@@ -68,15 +67,6 @@ def _main():
shutil.rmtree(tmpdir)
api.Backend.ldap2.disconnect()
- # Now restart Apache so the new certificate is available
- syslog.syslog(syslog.LOG_NOTICE, "Restarting httpd")
- try:
- services.knownservices.httpd.restart()
- except Exception as e:
- syslog.syslog(syslog.LOG_ERR, "Cannot restart httpd: %s" % e)
- else:
- syslog.syslog(syslog.LOG_NOTICE, "Restarted httpd")
-
def main():
try:
diff --git a/install/restart_scripts/restart_dirsrv b/install/restart_scripts/restart_dirsrv
index a8e78184f..72d3c544b 100644
--- a/install/restart_scripts/restart_dirsrv
+++ b/install/restart_scripts/restart_dirsrv
@@ -39,7 +39,8 @@ def _main():
syslog.syslog(syslog.LOG_NOTICE, "certmonger restarted dirsrv instance '%s'" % instance)
try:
- services.knownservices.dirsrv.restart(instance)
+ if services.knownservices.dirsrv.is_running():
+ services.knownservices.dirsrv.restart(instance)
except Exception as e:
syslog.syslog(syslog.LOG_ERR, "Cannot restart dirsrv (instance: '%s'): %s" % (instance, str(e)))
diff --git a/install/restart_scripts/restart_httpd b/install/restart_scripts/restart_httpd
index 50348d4ef..d16848129 100644
--- a/install/restart_scripts/restart_httpd
+++ b/install/restart_scripts/restart_httpd
@@ -29,7 +29,8 @@ def _main():
syslog.syslog(syslog.LOG_NOTICE, 'certmonger restarted httpd')
try:
- services.knownservices.httpd.restart()
+ if services.knownservices.httpd.is_running():
+ services.knownservices.httpd.restart()
except Exception as e:
syslog.syslog(syslog.LOG_ERR, "Cannot restart httpd: %s" % str(e))