[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: setting up a slapd.pid

On Thu, Oct 23, 2003 at 11:20:31AM -0700, Jason Williams wrote:
> >Maybe you are running ldap as a non-privileged user that cannot write to
> >/var/run? Try creating something like /var/run/slapd, owned by the user
> >under which slapd runs, and change pidfile do /var/run/slapd/slapd.pid.
> >Maybe this helps.
> I thought about this. Im running OpenLDAP 2.0.27 on Red Hat 7.3.
> I was stopping and starting LDAP by using the rc. scripts.
> One thing I noticed is that the slapd.log is owned by user 'ldap.' in 
> /var/log.
> I'm not sure if the .pid needs to be owned by ldap.
> If so, I guess I should go with what you suggested?

Yes, but you might encounter some trouble due to the way the init scripts
work. Basically, the script, when called with the "stop" parameter,
will try to kill the slapd process. It does this by first checking the
pid file it knows about (/var/run/slapd.pid, and not /var/run/slapd/slapd.pid).
If it doesn't find it, it will then kill anything called "slapd".

In my packages, I modified this init script to also look for a pid file in
/var/run/<daemon>/<daemon>.pid in addition to the standard /var/run/<daemon>.pid