2006-07-19 01:31:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
## this script counts wiki changes, done since the time it was last started
|
|
|
|
WIKIS="/data/moin/sites/"
|
|
|
|
STATS[0]="Auflistung der veraenderten Seiten je Wiki:\n"
|
|
|
|
i=1
|
|
|
|
for wiki in `ls $WIKIS`; do
|
|
|
|
countnew=`wc -l ${WIKIS}/${wiki}/edit-log | cut -d" " -f1`
|
|
|
|
countold=`wc -l ${WIKIS}/${wiki}/edit-log.old | cut -d" " -f1`
|
|
|
|
changes=$[${countnew}-${countold}]
|
|
|
|
STATS[$i]="\t${changes}\t${wiki}\n"
|
|
|
|
((i++))
|
|
|
|
#cp ${WIKIS}/${wiki}/edit-log ${WIKIS}/${wiki}/edit-log.old
|
|
|
|
done
|
2006-07-20 22:34:15 +02:00
|
|
|
#echo -e ${STATS[@]}
|
|
|
|
echo -e ${STATS[@]} | mail -s "[counter] TEST aktuelle Aenderungen" wikis@admin.systemausfall.org
|
2006-07-19 01:31:46 +02:00
|
|
|
|