[IRCServices] Turning over logs with crontab?

&quot &quot
Thu Oct 5 11:08:20 PDT 2000


You have my vote for that. :)  I'm looking at log files that run into the 100's of megs, and it would be nice to shuffle them off to another place, or automate it in some fashion.

- Randy Snow -
Senior Network Administrator
http://www.stratics.com/
irc.stratics.com port 6667 

-----Original Message-----
From: owner-ircservices at Snow.shadowfire.org
[<A  HREF="mailto:owner-ircservices at Snow.shadowfire.org]On">mailto:owner-ircservices at Snow.shadowfire.org]On</A> Behalf Of Chris Knipe
Sent: Thursday, October 05, 2000 12:46 PM
To: ircservices at Snow.shadowfire.org
Subject: Re: [IRCServices] Turning over logs with crontab?


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.


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