newsstats/contrib/dopostingstats.sh
Thomas Hochstein 2ff3ea38cc Change install path from /srv/ to /opt/.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-06-29 12:27:36 +02:00

14 lines
771 B
Bash
Executable file

#!/bin/bash
# installation path is /opt/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
/opt/newsstats/bin/groupstats.pl --nocomments --sums --format dump --month $MONTH | /opt/newsstats/bin/postingstats.pl --month $MONTH | /opt/newsstats/contrib/tinews.pl -X -Y
/opt/newsstats/bin/hoststats.pl --nocomments --sums --format dump --month $MONTH | /opt/newsstats/bin/postingstats.pl -t server --month $MONTH | /opt/newsstats/contrib/tinews.pl -X -Y
/opt/newsstats/bin/clientstats.pl --nocomments --sums --versions --format dump --month $MONTH | /opt/newsstats/bin/postingstats.pl -t client --month $MONTH | /opt/newsstats/contrib/tinews.pl -X -Y