/[smecontribs]/rpms/mailman/contribs9/mailman-2.1.11-cron.patch
ViewVC logotype

Annotation of /rpms/mailman/contribs9/mailman-2.1.11-cron.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Aug 21 17:29:56 2015 UTC (9 years, 2 months ago) by stephdl
Branch: MAIN
CVS Tags: mailman-2_1_12-103_el6_sme, mailman-2_1_12-100_el6_sme, mailman-2_1_12-104_el6_sme, mailman-2_1_12-25_el6_sme_sme, mailman-2_1_12-102_el6_sme, mailman-2_1_12-101_el6_sme, HEAD
Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.1.12
2.1.12-25.sme.sme - Initial release to contribs9

1 stephdl 1.1 diff -ruN mailman-2.1.12-a/cron/bumpdigests mailman-2.1.12-b/cron/bumpdigests
2     --- mailman-2.1.12-a/cron/bumpdigests 2009-02-23 22:23:35.000000000 +0100
3     +++ mailman-2.1.12-b/cron/bumpdigests 2009-07-28 12:19:49.000000000 +0200
4     @@ -1,4 +1,4 @@
5     -#! @PYTHON@
6     +#! @PYTHON@ -S
7     #
8     # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
9     #
10     diff -ruN mailman-2.1.12-a/cron/checkdbs mailman-2.1.12-b/cron/checkdbs
11     --- mailman-2.1.12-a/cron/checkdbs 2009-02-23 22:23:35.000000000 +0100
12     +++ mailman-2.1.12-b/cron/checkdbs 2009-07-28 12:19:49.000000000 +0200
13     @@ -1,4 +1,4 @@
14     -#! @PYTHON@
15     +#! @PYTHON@ -S
16     #
17     # Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
18     #
19     diff -ruN mailman-2.1.12-a/cron/crontab.in.in mailman-2.1.12-b/cron/crontab.in.in
20     --- mailman-2.1.12-a/cron/crontab.in.in 2009-02-23 22:23:35.000000000 +0100
21     +++ mailman-2.1.12-b/cron/crontab.in.in 2009-07-28 12:19:49.000000000 +0200
22     @@ -1,27 +1,50 @@
23     +#
24     +# -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING --
25     +# ------------------ EDIT THE CORRECT FILE -------------------------
26     +#
27     +# This file is copied to /etc/cron.d/mailman from
28     +# @prefix@/cron/crontab.in when the mailman service is started via its
29     +# init.d script and the file /etc/cron.d/mailman is removed when the
30     +# service is stopped. Therefore any edits made directly to
31     +# /etc/cron.d/mailman will be lost anytime the mailman service
32     +# restarts.
33     +#
34     +# To make changes edit the master copy @prefix@/cron/crontab.in and then
35     +# restart the service to pick up the changes (/sbin/service mailman restart).
36     +#
37     +# The reason this is done this way is because the mailman cron jobs
38     +# should only be invoked if the mailman service is enabled and not
39     +# just as a consequence of installing the rpm as was the case
40     +# previously. The file /etc/cron.d/mailman cannot simply be linked to
41     +# the master copy in @prefix@/cron because for security reasons cron
42     +# will not process crontab files that are links or writeable by
43     +# anybody else but root, thus the file must be copied into /etc/cron.d
44     +# with the right ownership and permissions.
45     +#
46     # At 8AM every day, mail reminders to admins as to pending requests.
47     # They are less likely to ignore these reminders if they're mailed
48     # early in the morning, but of course, this is local time... ;)
49     -0 8 * * * @PYTHON@ -S @prefix@/cron/checkdbs
50     +0 8 * * * @MAILMAN_USER@ @prefix@/cron/checkdbs
51     #
52     # At 9AM, send notifications to disabled members that are due to be
53     # reminded to re-enable their accounts.
54     -0 9 * * * @PYTHON@ -S @prefix@/cron/disabled
55     +0 9 * * * @MAILMAN_USER@ @prefix@/cron/disabled
56     #
57     # Noon, mail digests for lists that do periodic as well as threshhold delivery.
58     -0 12 * * * @PYTHON@ -S @prefix@/cron/senddigests
59     +0 12 * * * @MAILMAN_USER@ @prefix@/cron/senddigests
60     #
61     # 5 AM on the first of each month, mail out password reminders.
62     -0 5 1 * * @PYTHON@ -S @prefix@/cron/mailpasswds
63     +0 5 1 * * @MAILMAN_USER@ @prefix@/cron/mailpasswds
64     #
65     # Every 5 mins, try to gate news to mail. You can comment this one out
66     # if you don't want to allow gating, or don't have any going on right now,
67     # or want to exclusively use a callback strategy instead of polling.
68     -0,5,10,15,20,25,30,35,40,45,50,55 * * * * @PYTHON@ -S @prefix@/cron/gate_news
69     +0,5,10,15,20,25,30,35,40,45,50,55 * * * * @MAILMAN_USER@ @prefix@/cron/gate_news
70     #
71     # At 3:27am every night, regenerate the gzip'd archive file. Only
72     # turn this on if the internal archiver is used and
73     # GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
74     -27 3 * * * @PYTHON@ -S @prefix@/cron/nightly_gzip
75     +27 3 * * * @MAILMAN_USER@ @prefix@/cron/nightly_gzip
76     #
77     # At 4:30AM daily, cull old entries from the 'bad' and 'shunt' queues.
78     -30 4 * * * @PYTHON@ -S @prefix@/cron/cull_bad_shunt
79     +30 4 * * * @MAILMAN_USER@ @prefix@/cron/cull_bad_shunt
80     diff -ruN mailman-2.1.12-a/cron/disabled mailman-2.1.12-b/cron/disabled
81     --- mailman-2.1.12-a/cron/disabled 2009-02-23 22:23:35.000000000 +0100
82     +++ mailman-2.1.12-b/cron/disabled 2009-07-28 12:19:49.000000000 +0200
83     @@ -1,4 +1,4 @@
84     -#! @PYTHON@
85     +#! @PYTHON@ -S
86     #
87     # Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
88     #
89     diff -ruN mailman-2.1.12-a/cron/gate_news mailman-2.1.12-b/cron/gate_news
90     --- mailman-2.1.12-a/cron/gate_news 2009-02-23 22:23:35.000000000 +0100
91     +++ mailman-2.1.12-b/cron/gate_news 2009-07-28 12:19:49.000000000 +0200
92     @@ -1,4 +1,4 @@
93     -#! @PYTHON@
94     +#! @PYTHON@ -S
95     #
96     # Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
97     #
98     diff -ruN mailman-2.1.12-a/cron/mailpasswds mailman-2.1.12-b/cron/mailpasswds
99     --- mailman-2.1.12-a/cron/mailpasswds 2009-02-23 22:23:35.000000000 +0100
100     +++ mailman-2.1.12-b/cron/mailpasswds 2009-07-28 12:19:49.000000000 +0200
101     @@ -1,4 +1,4 @@
102     -#! @PYTHON@
103     +#! @PYTHON@ -S
104     #
105     # Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
106     #
107     diff -ruN mailman-2.1.12-a/cron/nightly_gzip mailman-2.1.12-b/cron/nightly_gzip
108     --- mailman-2.1.12-a/cron/nightly_gzip 2009-02-23 22:23:35.000000000 +0100
109     +++ mailman-2.1.12-b/cron/nightly_gzip 2009-07-28 12:19:49.000000000 +0200
110     @@ -1,4 +1,4 @@
111     -#! @PYTHON@
112     +#! @PYTHON@ -S
113     #
114     # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
115     #
116     diff -ruN mailman-2.1.12-a/cron/senddigests mailman-2.1.12-b/cron/senddigests
117     --- mailman-2.1.12-a/cron/senddigests 2009-02-23 22:23:35.000000000 +0100
118     +++ mailman-2.1.12-b/cron/senddigests 2009-07-28 12:19:49.000000000 +0200
119     @@ -1,4 +1,4 @@
120     -#! @PYTHON@
121     +#! @PYTHON@ -S
122     #
123     # Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
124     #
125     diff -ruN mailman-2.1.12-a/misc/mailman.in mailman-2.1.12-b/misc/mailman.in
126     --- mailman-2.1.12-a/misc/mailman.in 2009-07-28 12:19:48.000000000 +0200
127     +++ mailman-2.1.12-b/misc/mailman.in 2009-07-28 12:19:49.000000000 +0200
128     @@ -24,18 +24,48 @@
129     # On Debian, type "update-rc.d mailman defaults"
130     # On RedHat, and derivatives, install with "chkconfig --add mailman"
131     #
132     -# chkconfig: 2345 98 12
133     +# chkconfig: - 98 12
134     # description: Mailman is the GNU Mailing List Manager, a program that \
135     # manages electronic mail discussion groups. For more \
136     # on GNU Mailman see http://www.list.org
137     # processname: mailmanctl
138     # config: @prefix@/Mailman/mm_cfg.py
139     -# pidfile: @prefix@/data/master-qrunner.pid
140     +# pidfile: @PID_DIR@/master-qrunner.pid
141    
142     PYTHON=@PYTHON@
143     MAILMANHOME=@prefix@
144     MAILMANCTL=$MAILMANHOME/bin/mailmanctl
145    
146     +# We used to install the mailman cron jobs when the mailman rpm was
147     +# installed, irrespective of whether mailman was actually being
148     +# run. Although the cron jobs didn't create any problems if someone
149     +# wasn't running mailman some users complained about the cron log file
150     +# filling up, resource usage, and power consumption since systems
151     +# wouldn't really idle. It really only makes sense to run the mailman
152     +# cron jobs if the mailman service is turned on and not just merely
153     +# having the rpm installed. This init.d script is an obvious place to
154     +# install or remove the cron jobs based on the service being enabled
155     +# or not.
156     +
157     +SRC_CRON_SCRIPT=$MAILMANHOME/cron/crontab.in
158     +DST_CRON_SCRIPT=/etc/cron.d/mailman
159     +
160     +function InstallCron()
161     +{
162     + install -m644 -o root -g root $SRC_CRON_SCRIPT $DST_CRON_SCRIPT
163     +}
164     +
165     +function RemoveCron()
166     +{
167     +cat > $DST_CRON_SCRIPT <<EOF
168     +# DO NOT EDIT THIS FILE!
169     +#
170     +# Contents of this file managed by /etc/init.d/mailman
171     +# Master copy is @prefix@/cron/crontab.in
172     +# Consult that file for documentation
173     +EOF
174     +}
175     +
176     # Source function library.
177     . /etc/rc.d/init.d/functions
178    
179     @@ -47,7 +77,11 @@
180     echo -n $"Starting $prog: "
181     daemon $PYTHON $MAILMANCTL -s -q start
182     RETVAL=$?
183     - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
184     + if [ $RETVAL -eq 0 ]
185     + then
186     + touch /var/lock/subsys/$prog
187     + InstallCron
188     + fi
189     echo
190     return $RETVAL
191     }
192     @@ -57,7 +91,11 @@
193     echo -n $"Shutting down $prog: "
194     daemon $PYTHON $MAILMANCTL -q stop
195     RETVAL=$?
196     - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
197     + if [ $RETVAL -eq 0 ]
198     + then
199     + rm -f /var/lock/subsys/$prog
200     + RemoveCron
201     + fi
202     echo
203     return $RETVAL
204     }
205     @@ -101,5 +139,9 @@
206     RETVAL=$?
207     ;;
208    
209     +*)
210     + echo $"Usage: $prog {start|stop|restart|condrestart|status}"
211     + ;;
212     +
213     esac
214     exit $RETVAL

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed