[syslog-ng]logrotate question (not working with syslog-ng)...

nate syslog-ng@lists.balabit.hu
Wed, 9 Apr 2003 20:27:09 -0700 (PDT)


> Frank
>
> So you are saying that logrotate *already* does a HUP but
> the problem is that it is "HUP-ing" based on /var/run/syslogd.pid???
>
> Is this a new way to not only avoid modifying logrotate
> but also avoid -p switch!?!?!?!?!.....
>
> I can just make a soft link from /var/run/syslogd.pid
> to /var/run/syslogd-ng.pid!!!
>
> This is an even neater solution.

I restart it manually with a script that runs after logrotate(not
called from within logrotate):


#!/usr/local/bin/bash
PID="`/usr/local/bin/pidof syslog-ng`"

/usr/bin/logger "SYSLOG-RESTART Script(/usr/local/sbin/syslog-restart.sh):
Shutting Down syslog-ng(PID: $PID) .."
/bin/kill $PID
/usr/local/sbin/syslog-ng
PID="`/usr/local/bin/pidof syslog-ng`"
/usr/bin/logger "SYSLOG-RESTART Script(/usr/local/sbin/syslog-restart.sh):
Starting up syslog-ng(NEW PID: $PID).."

works well for me ..logrotate on my systems(freebsd) never did seem
to -HUP syslog-ng by itself(whenever logs got rotated, all new entries
would end up in messages.* files instead of the filtered log files),
so I do it this way..


nate