瀏覽代碼

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
Rich Megginson 14 年之前
父節點
當前提交
c006d67504
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      wrappers/systemd.template.service.in

+ 2 - 2
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