[IRCServices] Turning over logs with crontab?

Chris Knipe cgknipe at mweb.co.za
Thu Oct 5 10:45:59 PDT 2000


Hi,

Andrew...

Can we possibly look into some changes into services whereby log files are
rotated automatically, say at a time set in the config file?

Perhaps automating the logs to rotate should be a bit more, sufficient?

---
Regards,
Chris Knipe
Cell: (083) 430-8151

----- Original Message -----
From: Chris Wiest <kwahraw at relic.net>
To: <ircservices at ender.shadowfire.org>
Cc: <ircservices at snow.shadowfire.org>
Sent: Wednesday, October 04, 2000 8:09 PM
Subject: Re: [IRCServices] Turning over logs with crontab?


> This was a "hack" for me, however I modified services so that if they are
> sent a kill -HUP, they: rotate the logs, reload their configuration files,
> as well as send a global notice (GNOTICE) that they've received a SIGHUP
> signal. I also did a hack to the operserv.c, and extern.h so that a /msg
> operserv restart will properly restart (tagging that comand as the
> variable sigrestart)
>
> The code is below, some got chopped, but you should get the jist (from
> main.c)
>
> if(!sigrestart)
> {
>             save_data = 1;
> /*          signal(SIGHUP, SIG_IGN); */
>             log("Received SIGHUP, rehashing.");
> send_cmd(NULL, "GNOTICE :signal ^BSIGHUP^B received, reinitializing
> services log file$
> rotate_log(NULL);
> read_config();
> numcnt = 0;
> return;
> }
> else {
> save_data = -2;
> signal(SIGHUP, SIG_IGN);
> log("Received SIGHUP, restarting.");
> if (!quitmsg)
>
>
> etc..
>
> I then have a standard ircd type crontab running the kill -HUP command on
> the services pid daily, if you need more help, let me know.
>
> --Chris
>
> On Wed, 4 Oct 2000, Tim AtLee wrote:
>
> > Hi there
> >
> > I was wondering if services had a command-line thingey to rotate logs
(same
> > as /msg operserv rotatelog).
> >
> > Thanks,
> >
> > Tim
> >
> >
> >
> > ---------------------------------------------------------------
> > To unsubscribe, send email to majordomo at ender.shadowfire.org
> > with "unsubscribe ircservices" in the body, without the quotes.
> >
>
>
> ---------------------------------------------------------------
> To unsubscribe, send email to majordomo at ender.shadowfire.org
> with "unsubscribe ircservices" in the body, without the quotes.


---------------------------------------------------------------
To unsubscribe, send email to majordomo at ender.shadowfire.org
with "unsubscribe ircservices" in the body, without the quotes.