Browse Source

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!)
William Brown 9 years ago
parent
commit
d4deb29a2e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      wrappers/systemd.template.service.in

+ 2 - 2
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@/@[email protected]