]> jfr.im git - irc.git/blame - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2000/000799.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2000 / 000799.html
CommitLineData
3bd189cb
JR
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=003201c02e15%24154c80a0%2435c48e8b%40darktech.org">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="000798.html">
11 <LINK REL="Next" HREF="000800.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Turning over logs with crontab?</H1>
15 <B>Chris Wiest</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Turning%20over%20logs%20with%20crontab%3F&In-Reply-To=003201c02e15%24154c80a0%2435c48e8b%40darktech.org"
17 TITLE="[IRCServices] Turning over logs with crontab?">kwahraw at relic.net
18 </A><BR>
19 <I>Wed Oct 4 11:09:46 PDT 2000</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000798.html">[IRCServices] Turning over logs with crontab?
22</A></li>
23 <LI>Next message: <A HREF="000800.html">[IRCServices] Mailing List Downtime
24</A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#799">[ date ]</a>
27 <a href="thread.html#799">[ thread ]</a>
28 <a href="subject.html#799">[ subject ]</a>
29 <a href="author.html#799">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33<!--beginarticle-->
34<PRE>This was a &quot;hack&quot; for me, however I modified services so that if they are
35sent a kill -HUP, they: rotate the logs, reload their configuration files,
36as well as send a global notice (GNOTICE) that they've received a SIGHUP
37signal. I also did a hack to the operserv.c, and extern.h so that a /msg
38operserv restart will properly restart (tagging that comand as the
39variable sigrestart)
40
41The code is below, some got chopped, but you should get the jist (from
42main.c)
43
44if(!sigrestart)
45{
46 save_data = 1;
47/* signal(SIGHUP, SIG_IGN); */
48 log(&quot;Received SIGHUP, rehashing.&quot;);
49send_cmd(NULL, &quot;GNOTICE :signal ^BSIGHUP^B received, reinitializing
50services log file$
51rotate_log(NULL);
52read_config();
53numcnt = 0;
54return;
55}
56else {
57save_data = -2;
58signal(SIGHUP, SIG_IGN);
59log(&quot;Received SIGHUP, restarting.&quot;);
60if (!quitmsg)
61
62
63etc..
64
65I then have a standard ircd type crontab running the kill -HUP command on
66the services pid daily, if you need more help, let me know.
67
68--Chris
69
70On Wed, 4 Oct 2000, Tim AtLee wrote:
71
72&gt;<i> Hi there
73</I>&gt;<i>
74</I>&gt;<i> I was wondering if services had a command-line thingey to rotate logs (same
75</I>&gt;<i> as /msg operserv rotatelog).
76</I>&gt;<i>
77</I>&gt;<i> Thanks,
78</I>&gt;<i>
79</I>&gt;<i> Tim
80</I>&gt;<i>
81</I>&gt;<i>
82</I>&gt;<i>
83</I>&gt;<i> ---------------------------------------------------------------
84</I>&gt;<i> To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
85</I>&gt;<i> with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
86</I>&gt;<i>
87</I>
88
89---------------------------------------------------------------
90To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
91with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
92
93
94</PRE>
95
96<!--endarticle-->
97 <HR>
98 <P><UL>
99 <!--threads-->
100 <LI>Previous message: <A HREF="000798.html">[IRCServices] Turning over logs with crontab?
101</A></li>
102 <LI>Next message: <A HREF="000800.html">[IRCServices] Mailing List Downtime
103</A></li>
104 <LI> <B>Messages sorted by:</B>
105 <a href="date.html#799">[ date ]</a>
106 <a href="thread.html#799">[ thread ]</a>
107 <a href="subject.html#799">[ subject ]</a>
108 <a href="author.html#799">[ author ]</a>
109 </LI>
110 </UL>
111
112</body></html>