From 964877e169444745cc26acf25f10742030675bb2 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Fri, 20 Jan 2012 16:00:20 -0700 Subject: [PATCH] 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: ??? 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 --- wrappers/systemd.template.service.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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@/slapd-%i.pid -w @localstatedir@/run/@package_name@/slapd-%i.startpid +ExecStopPost=/bin/rm -f @localstatedir@/run/@package_name@/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 -- 1.7.1