52 lines
No EOL
1.1 KiB
Bash
Executable file
52 lines
No EOL
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# create static XHTML pages for statistics for a given awstats config
|
|
#
|
|
DIR="/etc/egscripts/egstats"
|
|
CMD="$DIR/egawstats"
|
|
CONF="$DIR/conf"
|
|
CONFSUF="conf"
|
|
#
|
|
# set defaults
|
|
ARG=""
|
|
MODE="help"
|
|
LOG="/var/log/$0.log"
|
|
#
|
|
# get command line args
|
|
while test $# -ne 0 ; do
|
|
case $1 in
|
|
--this)
|
|
ARG="--this"
|
|
;;
|
|
--last)
|
|
ARG="--last"
|
|
;;
|
|
--help|?|-h)
|
|
MODE="help"
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
#
|
|
# check for mode
|
|
if [ -z $ARG ] ; then
|
|
MODE="help"
|
|
else
|
|
MODE="run"
|
|
fi
|
|
|
|
if test $MODE == "run" ; then
|
|
$CMD $ARG -c far.org.nz -r /home/sites/public_html/far/www/stats
|
|
$CMD $ARG -c ics2006.co.nz -r /home/sites/public_html/stats/ics2006
|
|
# $CMD $ARG -c davelane.org -r /home/dlane/public_html/davelane.org/stats
|
|
# $CMD $ARG -c cypress.co.nz -r /home/cypress/public_html/stats
|
|
# $CMD $ARG -c far.org.nz -r /home/far/public_html/stats
|
|
else
|
|
echo "$0, copyright 2005 Egressive Limited, www.egressive.com"
|
|
echo ""
|
|
echo "Usage: $0 {--last | --this | -h}"
|
|
echo "--last - last month's statistics"
|
|
echo "--this - the current month's statistics"
|
|
echo "-h or --help - this help message"
|
|
fi
|
|
exit 0 |