wrappers/systemd.template.service.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c006d675045ae0da4682bf8c26b2d12a42ebeaf2
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Jan 20 16:00:20 2012 -0700
Ticket #262 - pid file not removed with systemd
https://fedorahosted.org/389/ticket/262
Resolves: Ticket #262
Bug Description: pid file not removed with systemd
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: The PIDDIR directive was problematic - just use the full
path to the pid dir. Add the ExecStopPost directive to remove the .pid
file after shutdown.
Platforms tested: Fedora 16
Flag Day: no
Doc impact: no
diff --git a/wrappers/systemd.template.service.in b/wrappers/systemd.template.service.in
index ead6f76..68d796b 100644
--- a/wrappers/systemd.template.service.in
+++ b/wrappers/systemd.template.service.in
@@ -17,10 +17,10 @@ After=@systemdgroupname@
[Service]
Type=forking
-Environment=PIDDIR=@localstatedir@/run/@package_name@
EnvironmentFile=@initconfigdir@/@package_name@
EnvironmentFile=@initconfigdir@/@package_name@-%i
-ExecStart=@sbindir@/ns-slapd -D @instconfigdir@/slapd-%i -i ${PIDDIR}/slapd-%i.pid -w
${PIDDIR}/slapd-%i.startpid
+ExecStart=@sbindir@/ns-slapd -D @instconfigdir@/slapd-%i -i
@localstatedir@/run/@package_name(a)/slapd-%i.pid -w
@localstatedir@/run/@package_name(a)/slapd-%i.startpid
+ExecStopPost=/bin/rm -f @localstatedir@/run/@package_name(a)/slapd-%i.pid
# uncomment this line to raise the file descriptor limit - but do not edit this
# file in /lib/systemd/system - see above for instructions
# LimitNOFILE=8192