newsstats/contrib/dopostingstats.sh
Thomas Hochstein cff76a3c65 Set executable bit for new scripts.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-06-01 11:03:05 +02:00

14 lines
771 B
Bash
Executable file

#!/bin/bash
# installation path is /srv/newsstats/, please adjust accordingly
# get month
MONTH=$1
if ! [[ $1 =~ [0-9]{4}-[0-9]{2} ]]; then
MONTH=$(date -d "$(date +%Y-%m-15) -1 month" '+%Y-%m')
fi
# post stats
/srv/newsstats/bin/groupstats.pl --nocomments --sums --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y
/srv/newsstats/bin/hoststats.pl --nocomments --sums --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl -t server --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y
/srv/newsstats/bin/clientstats.pl --nocomments --sums --versions --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl -t client --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y