From 0d34f9df39978a2a2a6fea02b5e2f8db0ce48228 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Nov 10 2017 13:11:57 +0000 Subject: SYSTEMD: Clean pid file in corner cases SSSD can cleanup pid file in case of standard stopping of daemon. It's done in function monitor_cleanup. However monitor does not have a change to cleanup file in case of OOM or sending SIGKILL to monitor. Even though PIDFile is not necessary for services with Type notify we should let systemd to clean this file in unexpected situations. Resolves: https://pagure.io/SSSD/sssd/issue/3528 Reviewed-by: Fabiano FidĂȘncio (cherry picked from commit f4b808c83ecbaf36c7069440535d62990e32d55d) (cherry picked from commit 4ae029562a1a2d0ed964f8e864f7cbd73faaa4bc) --- diff --git a/src/sysv/systemd/sssd.service.in b/src/sysv/systemd/sssd.service.in index 05cfd37..9eaa5ad 100644 --- a/src/sysv/systemd/sssd.service.in +++ b/src/sysv/systemd/sssd.service.in @@ -9,6 +9,7 @@ EnvironmentFile=-@environment_file@ ExecStart=@sbindir@/sssd -i -f Type=notify NotifyAccess=main +PIDFile=@localstatedir@/run/sssd.pid [Install] WantedBy=multi-user.target