Files
freeipa/install/restart_scripts/restart_dirsrv
Rob Crittenden 717bbcd2bf 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
2012-04-10 01:08:41 -04:00

14 lines
306 B
Python

#!/usr/bin/python -E
import sys
from ipapython import services as ipaservices
try:
instance = sys.argv[1]
except IndexError:
instance = ""
try:
ipaservices.knownservices.dirsrv.restart(instance)
except Exception, e:
print "Cannot restart dirsrv (instance: '%s'): %s" % (instance, str(e))