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

syslog-ng@lists.balabit.hu syslog-ng@lists.balabit.hu
Wed, 9 Apr 2003 23:42:18 -0700


Nate

Why didn't you just modify the logrotate
script for syslog?... else how is your own
script called when a rotation happens?

Chris


On Wed, Apr 09, 2003 at 08:27:09PM -0700, nate wrote:
> > 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
> 
> 
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html

-- 
_______________________________________

Dr. Christian Seberino
SPAWAR Systems Center San Diego
Code 2872
49258 Mills Street, Room 158
San Diego, CA 92152-5385
U.S.A.

Phone: (619) 553-9973
Fax:   (619) 553-6521
Email: seberino@spawar.navy.mil
_______________________________________