On Thu, Feb 27, 2014 at 09:05:06PM -0500, [email protected] wrote:
> Hello,
>
> I'm running spampd, installed from package snapshots (Feb 25) on the Feb 24
> amd64 snapshot of 5.5.
>
> It's working fine with postfix, and starts and stops fine interactively with
> /etc/rc.d/spampd stop, start.
>
> I can't seem to work through yet an issue when starting it on a reboot. It
> seems to start then immediately receives a HUP and dies, looking for the pid
> file in the wrong (default) location.
>
> I've customized the flags in my /etc/rc.d/spampd:
Don't.
Use rc.conf.local as explained in rc.d(8).
> daemon="/usr/local/sbin/spampd"
> daemon_flags="--a --rh --p=/var/spampd/spampd.pid --relayport=10026"
> . /etc/rc.d/rc.subr
> pexp="/usr/bin/perl -T ${daemon}${daemon_flags:+ ${daemon_flags}}"
> rc_cmd $1
>
> On a reboot, I get this behaviour:
>
> Feb 27 14:01:49 mx2 spampd[22950]: Process Backgrounded
> Feb 27 14:01:49 mx2 spampd[22950]: 2014/02/27-14:01:49 SpamPD (type
> Net::Server::PreForkSimple) starting! pid(22950)
> Feb 27 14:01:49 mx2 spampd[22950]: Binding to TCP port 10025 on host
> 127.0.0.1 with IPv4
> Feb 27 14:01:49 mx2 spampd[22950]: Setting gid to "731 731"
> Feb 27 14:01:49 mx2 spampd[22950]: Setting uid to "731"
> Feb 27 14:01:50 mx2 spampd[22950]: Received a SIG HUP
> Feb 27 14:01:50 mx2 spampd[22950]: 2014/02/27-14:01:50 Server closing!
> Feb 27 14:01:51 mx2 spampd[22950]: 2014/02/27-14:01:51 Re-exec server during
> HUP
> Feb 27 14:01:54 mx2 spampd[22950]: 2014/02/27-14:01:54 Couldn't open pid
> file "/var/run/spampd.pid" [Permission denied]. at line 180 in file
> /usr/local/libdata/perl5/site_perl/Net/Server.pm
> Feb 27 14:01:54 mx2 spampd[22950]: 2014/02/27-14:01:54 Server closing!
Looks like the pid file is not properly removed.
Can you drop the '--p=' option and see if it helps.
--
Antoine