Comment 5 for bug 158252

Revision history for this message
KarlGoetz (kgoetz) wrote : Re: [Bug 158252] Re: dspam won't start: /var/run/dspam missing in tmpfs

On Wed, 2007-10-31 at 07:05 +0000, Swâmi Petaramesh wrote:
> I used the following at the beginning of dspam initscript :
>
> [ -d /var/run/dspam ] || { mkdir /var/run/dspam; chown dspam:
> /var/run/dspam; }
>
> (Did the same for the "sympa" initscript)
>
> I believe the "chown" can be useful in letting the daemon act on its
> pidfile once started, isn't it ? If seen some daemons who are unhappy if
> their /var/run/something directory doesn't belong to them...
>

I used [1], as per the diff.
I havent put data through dspam yet, but having the pid owned (or at the
very least writable) always helps. on my system the directory was chgrp
dspam - i asume the init script was run as dspam or something?

kk

[1] (now with less extra bits as i try to make my thoughts clear!)
test -d $(dirname $PIDFILE) || mkdir -p -m 755 $(dirname $PIDFILE)