------------------------------------------------------------
revno: 1036
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Fri 2008-02-01 13:37:53 -0800
message:
Updated contrib/mmdsr
modified:
NEWS
contrib/mmdsr
=== modified file 'NEWS'
--- a/NEWS 2007-12-17 01:00:19 +0000
+++ b/NEWS 2008-02-01 21:37:53 +0000
@@ -153,6 +153,10 @@
moving the entry aside and logging the fact after the third dequeue of
the same entry.
+ Miscellaneous
+
+ - Brad Knowles' mailman daily status report script updated to 0.0.17.
+
2.1.9 (12-Sep-2006)
Security
=== modified file 'contrib/mmdsr'
--- a/contrib/mmdsr 2006-01-29 17:40:36 +0000
+++ b/contrib/mmdsr 2008-02-01 21:37:53 +0000
@@ -149,6 +149,11 @@
# Updated on: Sun Jan 29 11:45:58 CET 2006
# Mark found a couple of typos that I somehow let slip
# through. Thanks!
+#
+# 0.0.17 Update by Mark Sapiro <[EMAIL PROTECTED]>
+# Updated on: Thu Jan 3 18:25:06 PST 2008
+# Enabled processing the prior generation of a rotated log.
+# Added SORT_FIELD to the user modifiable parameters.
###############################################################################
# Set up locations of standard commands, directories, etc....
@@ -225,6 +230,12 @@
SUBDIRS="archive bounces commands in news out retry shunt virgin"
###############################################################################
+# Specify the field specifier used by your sort command to select the second
+# field. This will normally be "+1" or "-k 2".
+###############################################################################
+SORT_FIELD="+1"
+
+###############################################################################
# Specify recipients for report. If none, then simply print to "STDOUT".
# Specify sender address for report. Not used if recipient list is empty.
###############################################################################
@@ -304,7 +315,11 @@
echo "==============================" >> $TMP
if [ -f "$LOGDIR/${LOG}" ] ; then
- $SED -e :a -e '$!N;s/\n //;ta' -e 'P;D' $LOGDIR/$LOG | $GREP -si "^$DAY
[0-9][0-9:]* $YEAR" >> $TMPLOG
+ if [ -f "$LOGDIR/${LOG}.1" ] ; then
+ $SED -e :a -e '$!N;s/\n //;ta' -e 'P;D' ${LOGDIR}/${LOG}.1
$LOGDIR/$LOG | $GREP -si "^$DAY [0-9][0-9:]* $YEAR" >> $TMPLOG
+ else
+ $SED -e :a -e '$!N;s/\n //;ta' -e 'P;D' $LOGDIR/$LOG | $GREP -si
"^$DAY [0-9][0-9:]* $YEAR" >> $TMPLOG
+ fi
if [ "${LOG}" = "post" ] ; then
@@ -312,7 +327,7 @@
echo "Hourly Summary of Posts" >> $TMP
echo "-----------------------" >> $TMP
- $SED -e 's/^[A-Z][a-z][a-z] *[0-9]* //' -e 's/:.*$//' $TMPLOG |
$UNIQ -c | $SORT -n +1 | $AWK '{ printf( "%8d %02d:00-%02d:59\n", $1, $2, $2 )
}' >> $TMP
+ $SED -e 's/^[A-Z][a-z][a-z] *[0-9]* //' -e 's/:.*$//' $TMPLOG |
$UNIQ -c | $SORT -n $SORT_FIELD | $AWK '{ printf( "%8d %02d:00-%02d:59\n", $1,
$2, $2 ) }' >> $TMP
echo "" >> $TMP
echo "Post Count by List" >> $TMP
@@ -372,9 +387,13 @@
$TOUCH $TMPLOG
echo "Log file: $LOG" >> $TMP
echo "==============================" >> $TMP
- $GREP -si "^$DAY [0-9][0-9:]* $YEAR" $LOGDIR/$LOG >> $TMPLOG
if [ -f "$LOGDIR/${LOG}" ] ; then
+ if [ -f "$LOGDIR/${LOG}.1" ] ; then
+ $GREP -si "^$DAY [0-9][0-9:]* $YEAR" ${LOGDIR}/${LOG}.1
${LOGDIR}/${LOG} | $SED "s/^[^:]*://" >> $TMPLOG
+ else
+ $GREP -si "^$DAY [0-9][0-9:]* $YEAR" ${LOGDIR}/${LOG} >> $TMPLOG
+ fi
if [ "${LOG}" = "error" ] ; then
--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org