Add tasks.systemd_daemon_reload()

systemd daemon must be reloaded after a config file is added, changed,
or removed. Provide a common API endpoint in ipaplatform.tasks.

Related: https://pagure.io/freeipa/issue/7860
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Christian Heimes
2019-04-02 16:13:05 +02:00
parent 3cb1ccb3b0
commit e4621f1204
4 changed files with 13 additions and 7 deletions

View File

@@ -451,7 +451,7 @@ class Restore(admintool.AdminTool):
oddjobd.start()
http.remove_httpd_ccaches()
# have the daemons pick up their restored configs
run([paths.SYSTEMCTL, "--system", "daemon-reload"])
tasks.systemd_daemon_reload()
finally:
try:
os.chdir(cwd)