summaryrefslogtreecommitdiffstats
path: root/install/restart_scripts/restart_httpd
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-04-10 21:21:08 +0200
committerRob Crittenden <rcritten@redhat.com>2012-04-10 01:08:41 -0400
commit717bbcd2bf624ad68ea1cdf08216ab4f06e8bc4d (patch)
treec322f49a4d11e13bd69ee1f7db69b377f62c93c4 /install/restart_scripts/restart_httpd
parente9b79cc1e111bbdc91675f8a2f48a92baa4266c9 (diff)
downloadfreeipa-717bbcd2bf624ad68ea1cdf08216ab4f06e8bc4d.tar.gz
freeipa-717bbcd2bf624ad68ea1cdf08216ab4f06e8bc4d.tar.xz
freeipa-717bbcd2bf624ad68ea1cdf08216ab4f06e8bc4d.zip
Configure certmonger to execute restart scripts on renewal.
certmonger now has the ability to execute a script when it renews a certificate. This can be used to automatically restart servers so the certificate doesn't expire in the running server. https://fedorahosted.org/freeipa/ticket/2050
Diffstat (limited to 'install/restart_scripts/restart_httpd')
-rw-r--r--install/restart_scripts/restart_httpd7
1 files changed, 7 insertions, 0 deletions
diff --git a/install/restart_scripts/restart_httpd b/install/restart_scripts/restart_httpd
new file mode 100644
index 000000000..a53ab6e62
--- /dev/null
+++ b/install/restart_scripts/restart_httpd
@@ -0,0 +1,7 @@
+#!/usr/bin/python -E
+from ipapython import services as ipaservices
+
+try:
+ ipaservices.knownservices.httpd.restart()
+except Exception, e:
+ print "Cannot restart httpd: %s" % str(e)