Le 20/09/2018 15:54, Stuart Henderson a écrit :
On 2018/09/20 13:58, Joel Carnat wrote:
Hi,
By default, syslog-ng uses /var/run/syslog.pid:
# grep pid /etc/rc.d/syslog_ng
daemon_flags="-p /var/run/syslog.pid"
This interferes (during newsyslog) with syslogd which is also using
this pid
file.
One can use `rcctl set syslog_ng flags -p /var/run/syslog-ng.pid` to
solve
this.
But wouldn't it be better to set another default pid file in
/etc/rc.d/syslog_ng ?
Best regards.
I think that might have originally been intentional, to make things
easier for people using syslog-ng in place of syslogd. But that can't
actually work with the syslog-ng version currently in ports (in
OpenBSD 5.6+ the new fd-safe sendsyslog interface is used, syslog-ng
didn't start supporting this until 3.14.1, ports has 3.12.1), so it
probably does make sense to change this.
Does it use a sane pid filename by default? If so then it might be
best to leave the -p flag out from the rc script completely.
According to the Makefile: "--with-pidfile-dir=/var/run".
I've commented both daemon_flags and syslog_ng_flags and restarted
syslog-ng.
A /var/run/syslog-ng.pid file was created referencing the correct PID.
So I'd say removing the daemon_flags line from rc.d/syslog_ng would be
enough.