]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2000/000801.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2000 / 000801.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] Turning over logs with crontab?
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Turning over logs with crontab?</H1>
15 <B>Chris Knipe</B>
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
18 </A><BR>
19 <I>Thu Oct 5 10:45:59 PDT 2000</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000800.html">[IRCServices] Mailing List Downtime
22 </A></li>
23 <LI>Next message: <A HREF="000802.html">[IRCServices] Turning over logs with crontab?
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>Hi,
35
36 Andrew...
37
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?
40
41 Perhaps automating the logs to rotate should be a bit more, sufficient?
42
43 ---
44 Regards,
45 Chris Knipe
46 Cell: (083) 430-8151
47
48 ----- Original Message -----
49 From: Chris Wiest &lt;<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">kwahraw at relic.net</A>&gt;
50 To: &lt;<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ircservices at ender.shadowfire.org</A>&gt;
51 Cc: &lt;<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ircservices at snow.shadowfire.org</A>&gt;
52 Sent: Wednesday, October 04, 2000 8:09 PM
53 Subject: Re: [IRCServices] Turning over logs with crontab?
54
55
56 &gt;<i> This was a &quot;hack&quot; for me, however I modified services so that if they are
57 </I>&gt;<i> sent a kill -HUP, they: rotate the logs, reload their configuration files,
58 </I>&gt;<i> as well as send a global notice (GNOTICE) that they've received a SIGHUP
59 </I>&gt;<i> signal. I also did a hack to the operserv.c, and extern.h so that a /msg
60 </I>&gt;<i> operserv restart will properly restart (tagging that comand as the
61 </I>&gt;<i> variable sigrestart)
62 </I>&gt;<i>
63 </I>&gt;<i> The code is below, some got chopped, but you should get the jist (from
64 </I>&gt;<i> main.c)
65 </I>&gt;<i>
66 </I>&gt;<i> if(!sigrestart)
67 </I>&gt;<i> {
68 </I>&gt;<i> save_data = 1;
69 </I>&gt;<i> /* signal(SIGHUP, SIG_IGN); */
70 </I>&gt;<i> log(&quot;Received SIGHUP, rehashing.&quot;);
71 </I>&gt;<i> send_cmd(NULL, &quot;GNOTICE :signal ^BSIGHUP^B received, reinitializing
72 </I>&gt;<i> services log file$
73 </I>&gt;<i> rotate_log(NULL);
74 </I>&gt;<i> read_config();
75 </I>&gt;<i> numcnt = 0;
76 </I>&gt;<i> return;
77 </I>&gt;<i> }
78 </I>&gt;<i> else {
79 </I>&gt;<i> save_data = -2;
80 </I>&gt;<i> signal(SIGHUP, SIG_IGN);
81 </I>&gt;<i> log(&quot;Received SIGHUP, restarting.&quot;);
82 </I>&gt;<i> if (!quitmsg)
83 </I>&gt;<i>
84 </I>&gt;<i>
85 </I>&gt;<i> etc..
86 </I>&gt;<i>
87 </I>&gt;<i> I then have a standard ircd type crontab running the kill -HUP command on
88 </I>&gt;<i> the services pid daily, if you need more help, let me know.
89 </I>&gt;<i>
90 </I>&gt;<i> --Chris
91 </I>&gt;<i>
92 </I>&gt;<i> On Wed, 4 Oct 2000, Tim AtLee wrote:
93 </I>&gt;<i>
94 </I>&gt;<i> &gt; Hi there
95 </I>&gt;<i> &gt;
96 </I>&gt;<i> &gt; I was wondering if services had a command-line thingey to rotate logs
97 </I>(same
98 &gt;<i> &gt; as /msg operserv rotatelog).
99 </I>&gt;<i> &gt;
100 </I>&gt;<i> &gt; Thanks,
101 </I>&gt;<i> &gt;
102 </I>&gt;<i> &gt; Tim
103 </I>&gt;<i> &gt;
104 </I>&gt;<i> &gt;
105 </I>&gt;<i> &gt;
106 </I>&gt;<i> &gt; ---------------------------------------------------------------
107 </I>&gt;<i> &gt; To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
108 </I>&gt;<i> &gt; with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
109 </I>&gt;<i> &gt;
110 </I>&gt;<i>
111 </I>&gt;<i>
112 </I>&gt;<i> ---------------------------------------------------------------
113 </I>&gt;<i> To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
114 </I>&gt;<i> with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
115 </I>
116
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 &quot;unsubscribe ircservices&quot; in the body, without the quotes.
120
121
122 </PRE>
123
124 <!--endarticle-->
125 <HR>
126 <P><UL>
127 <!--threads-->
128 <LI>Previous message: <A HREF="000800.html">[IRCServices] Mailing List Downtime
129 </A></li>
130 <LI>Next message: <A HREF="000802.html">[IRCServices] Turning over logs with crontab?
131 </A></li>
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>
137 </LI>
138 </UL>
139
140 </body></html>