mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
6d02eddd3e
Replace the @PYTHONSHEBANG@ substitution with a valid #!/usr/bin/python3 shebang. This turns Python .in files into valid Python files. The files can now be checked with pylint and IDEs recognize the files as Python files. The shebang is still replaced with "#!$(PYTHON) -E" to support platform-python. Related: https://pagure.io/freeipa/issue/7984 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
28 lines
660 B
Python
28 lines
660 B
Python
#!/usr/bin/python3
|
|
#
|
|
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
|
#
|
|
|
|
import syslog
|
|
import traceback
|
|
|
|
from ipaplatform import services
|
|
from ipaserver.install import certs
|
|
|
|
|
|
def main():
|
|
with certs.renewal_lock:
|
|
try:
|
|
if services.knownservices.krb5kdc.is_running():
|
|
syslog.syslog(syslog.LOG_NOTICE, 'restarting krb5kdc')
|
|
services.knownservices.krb5kdc.restart()
|
|
except Exception as e:
|
|
syslog.syslog(
|
|
syslog.LOG_ERR, "cannot restart krb5kdc: {}".format(e))
|
|
|
|
|
|
try:
|
|
main()
|
|
except Exception:
|
|
syslog.syslog(syslog.LOG_ERR, traceback.format_exc())
|