Skip to content

Commit cc59487

Browse files
committed
mm2 stats
1 parent fe76522 commit cc59487

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

scripts/mm2_stats.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
#
4+
# Collects stats about mailing list subscribers.
5+
#
6+
# Run as crontab:
7+
#
8+
# 0 1 * * * /home/crestmlman/scripts/mm2_stats.sh > /tmp/mm2_stats.log
9+
10+
set -xe
11+
12+
LIST_MEMBERS_EXECUTABLE="/opt/mailman/default/bin/list_members"
13+
lists="boost boost-users boost-announce"
14+
current_date=$(date "+%Y-%m-%d")
15+
16+
cd "${HOME}"
17+
mkdir -p mm2_stats
18+
cd mm2_stats
19+
20+
for list in $lists; do
21+
count=$(${LIST_MEMBERS_EXECUTABLE} "${list}" | wc -l)
22+
echo "${current_date} ${count}" >> "${list}.txt"
23+
done

0 commit comments

Comments
 (0)