On 3/5/07, Shawn <[EMAIL PROTECTED]> wrote:
> On March 5, 2007, Arden wrote:
> > I assume it is a good idea to stop syslogd before rotating the logs
> > in /var/log/. What are the proper commands to stop and restart
> > syslogd?
> >
> > Do I use;
> > # stop /etc/rc.d/init.d/syslogd
> > and
> > # restart /etc/rc.d/init.d/syslogd
>
> I use logrotate so I came up with this that seems to work.
> #
> # logrotate config file for log files created by syslogd
> #
> # A HUP signal to syslogd closes all files and reopens
> # and reinitializes them for writing.
> #
> /var/log/sys.log /var/log/kern.log /var/log/user.log /var/log/cron.log
> /var/log/mail.log /var/log/daemon.log
> /var/log/auth.log {
> rotate 5
> weekly
> sharedscripts
> postrotate
> kill -HUP `cat /var/run/syslogd.pid`
> endscript
> }
Yeah, I'm pretty sure that on Fedora they just send HUP to syslogd so
that it will release the files it's holding and reread it's
configuration, and that's what I've been doing. Fortunately, the
"reload" target for our bootscripts should do this. So, you should
just be able to do
/etc/rc.d/init.d/sysklogd reload
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page