#! /bin/sh printf "alternc account created over time: " find /var/alternc/html/ -maxdepth 2 | wc -l printf "valid accounts: " mysql --defaults-file=/etc/mysql/debian.cnf -B system -e 'select COUNT(*) from membres where created IS not NULL;' | tail -1 printf "active accounts: " mysql --defaults-file=/etc/mysql/debian.cnf -B system -e 'select COUNT(*) from membres where DATE_ADD(lastlogin, INTERVAL 1 MONTH) > NOW();' | tail -1 printf "websites defined, without redirections or webmail: " find /var/alternc/dns -type l -maxdepth 2 \! -lname '*dns/redir*' \! -lname '*webmail*' | wc -l printf "email account count: " find /var/alternc/mail -maxdepth 2 | wc -l cd /var/lib/mailman/lists/ TMP=/var/log/alternc/mailman_subscribers.`date +%Y%m%d` if [ ! -e $TMP ] ; then echo "subscriber count does not exist, creating, will take a while" >&2 for f in * do echo -n `../bin/list_members $f | wc -l` ;printf "\t$f\n" done > $TMP fi printf "list count: " wc -l $TMP awk '{ count = count + $1 } END { print "mailman subscriber count: " count }' < $TMP printf "top 5 mailing lists: " sort -nr $TMP | head -5