1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] Turning over logs with crontab?
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Turning%20over%20logs%20with%20crontab%3F&In-Reply-To=">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"000800.html">
11 <LINK REL=
"Next" HREF=
"000802.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] Turning over logs with crontab?
</H1>
16 <A HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Turning%20over%20logs%20with%20crontab%3F&In-Reply-To="
17 TITLE=
"[IRCServices] Turning over logs with crontab?">cgknipe at mweb.co.za
19 <I>Thu Oct
5 10:
45:
59 PDT
2000</I>
21 <LI>Previous message:
<A HREF=
"000800.html">[IRCServices] Mailing List Downtime
23 <LI>Next message:
<A HREF=
"000802.html">[IRCServices] Turning over logs with crontab?
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#801">[ date ]
</a>
27 <a href=
"thread.html#801">[ thread ]
</a>
28 <a href=
"subject.html#801">[ subject ]
</a>
29 <a href=
"author.html#801">[ author ]
</a>
38 Can we possibly look into some changes into services whereby log files are
39 rotated automatically, say at a time set in the config file?
41 Perhaps automating the logs to rotate should be a bit more, sufficient?
48 ----- Original Message -----
49 From: Chris Wiest
<<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">kwahraw at relic.net
</A>>
50 To:
<<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">ircservices at ender.shadowfire.org
</A>>
51 Cc:
<<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">ircservices at snow.shadowfire.org
</A>>
52 Sent: Wednesday, October
04,
2000 8:
09 PM
53 Subject: Re: [IRCServices] Turning over logs with crontab?
56 ><i> This was a
"hack
" for me, however I modified services so that if they are
57 </I>><i> sent a kill -HUP, they: rotate the logs, reload their configuration files,
58 </I>><i> as well as send a global notice (GNOTICE) that they've received a SIGHUP
59 </I>><i> signal. I also did a hack to the operserv.c, and extern.h so that a /msg
60 </I>><i> operserv restart will properly restart (tagging that comand as the
61 </I>><i> variable sigrestart)
63 </I>><i> The code is below, some got chopped, but you should get the jist (from
66 </I>><i> if(!sigrestart)
68 </I>><i> save_data =
1;
69 </I>><i> /* signal(SIGHUP, SIG_IGN); */
70 </I>><i> log(
"Received SIGHUP, rehashing.
");
71 </I>><i> send_cmd(NULL,
"GNOTICE :signal ^BSIGHUP^B received, reinitializing
72 </I>><i> services log file$
73 </I>><i> rotate_log(NULL);
74 </I>><i> read_config();
75 </I>><i> numcnt =
0;
79 </I>><i> save_data = -
2;
80 </I>><i> signal(SIGHUP, SIG_IGN);
81 </I>><i> log(
"Received SIGHUP, restarting.
");
82 </I>><i> if (!quitmsg)
87 </I>><i> I then have a standard ircd type crontab running the kill -HUP command on
88 </I>><i> the services pid daily, if you need more help, let me know.
92 </I>><i> On Wed,
4 Oct
2000, Tim AtLee wrote:
94 </I>><i> > Hi there
96 </I>><i> > I was wondering if services had a command-line thingey to rotate logs
98 ><i> > as /msg operserv rotatelog).
100 </I>><i> > Thanks,
106 </I>><i> > ---------------------------------------------------------------
107 </I>><i> > To unsubscribe, send email to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org
</A>
108 </I>><i> > with
"unsubscribe ircservices
" in the body, without the quotes.
112 </I>><i> ---------------------------------------------------------------
113 </I>><i> To unsubscribe, send email to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org
</A>
114 </I>><i> with
"unsubscribe ircservices
" in the body, without the quotes.
117 ---------------------------------------------------------------
118 To unsubscribe, send email to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org
</A>
119 with
"unsubscribe ircservices
" in the body, without the quotes.
128 <LI>Previous message:
<A HREF=
"000800.html">[IRCServices] Mailing List Downtime
130 <LI>Next message:
<A HREF=
"000802.html">[IRCServices] Turning over logs with crontab?
132 <LI> <B>Messages sorted by:
</B>
133 <a href=
"date.html#801">[ date ]
</a>
134 <a href=
"thread.html#801">[ thread ]
</a>
135 <a href=
"subject.html#801">[ subject ]
</a>
136 <a href=
"author.html#801">[ author ]
</a>