From d4deb29a2ed2c738fab41500e6c806f40c4dff17 Mon Sep 17 00:00:00 2001 From: William Brown Date: Feb 25 2016 00:14:28 +0000 Subject: Ticket 47951 - Add PIDFile option to .service Bug Description: Add the PIDFile option to the .service. There are two reasons for this. * First, if the pidfile exists on server stop, it will be removed. * Second, if the user changes to type=forking, this will let systemd track the pid correctly Fix Description: Add the PIDFile line, and remove the startpid as it's no longer needed https://fedorahosted.org/389/ticket/47951 Author: wibrown Review by: nhosoi (Thanks!) --- diff --git a/wrappers/systemd.template.service.in b/wrappers/systemd.template.service.in index 4e4cf76..629c1ad 100644 --- a/wrappers/systemd.template.service.in +++ b/wrappers/systemd.template.service.in @@ -21,8 +21,8 @@ After=chronyd.service Type=notify EnvironmentFile=@initconfigdir@/@package_name@ EnvironmentFile=@initconfigdir@/@package_name@-%i -ExecStart=@sbindir@/ns-slapd -D @instconfigdir@/slapd-%i -i @localstatedir@/run/@package_name@/slapd-%i.pid -w @localstatedir@/run/@package_name@/slapd-%i.startpid -ExecStopPost=/bin/rm -f @localstatedir@/run/@package_name@/slapd-%i.pid +PIDFile=@localstatedir@/run/@package_name@/slapd-%i.pid +ExecStart=@sbindir@/ns-slapd -D @instconfigdir@/slapd-%i -i @localstatedir@/run/@package_name@/slapd-%i.pid # if you need to set other directives e.g. LimitNOFILE=8192 # set them in this file .include @initconfigdir@/@package_name@.systemd