sao jetzt auch mit mailinglisten counter

This commit is contained in:
age 2006-07-25 21:34:27 +00:00
parent 5eaf95a36e
commit 6eec5b7b00

View file

@ -1 +1,18 @@
blafooball
#!/bin/sh
set -e
LISTPATH="/data/lists/"
STATS[0]="Mailinglisten Verkehr:\n"
i=1
for list in `ls ${LISTPATH}`; do
#for list in "/data/lists/svn-codekasten" do
if [ -r ${list}/num ]; then
countnew=`cut -d ":" -f1 ${list}/num`
countold=`cut -d ":" -f1 ${list}/num.old`
changes=$[${countnew}-${countold}]
STATS[$i]="\t${changes}\t${list}\n"
((i++))
cp ${list}/num ${list}/num.old
fi
done
#echo -e ${STATS[@]}
echo -e ${STATS[@]} | mail -s "[counter] aktuelle Aenderungen" qmail@admin.systemausfall.org