*this could/will break DA possibly*techmonkey said:Do you know how I would disable webalizer completely?
#! /bin/bash
#
# Parse the command line to get the domain...
#
DOMAIN=""
while [ $# -ge 1 ]; do
if [ "$1" = "-n" ]; then
shift
DOMAIN="$1"
fi
shift
done
if [ "$DOMAIN" = "" ]; then
DOMAIN=`hostname`
fi
#
# If we don't want webalizer stats for this domain, just exit...
#
if [ "$DOMAIN" = "example1.com" ]; then
exit 0
fi
#
# Finally, run the original webalizer executable...
#
/usr/bin/webalizer-orig $*
Is webalizer now called domain by domain?markus said:...or something like that.
#! /bin/bash
# As of v 1.23.3 DirectAdmin calls this script as follows:
# webalizer -p \
# -n |DOMAIN| \
# -o /home/|USER|/domains/|DOMAIN|/stats \
# /var/log/httpd/domains/|DOMAIN|.log
#
# we get the args from $* and get the current domain from there.
#
# we also generate our webalizer.conf on the fly :-)
#
# The argument --extra-args could be used to include new commands to
# our own custom webalizer.conf (useful only for testing).
#
#
# Parse command line arguments...
#
DOMAIN=""
DA_ARGS=""
EXTRA_ARGS=""
while [ $# -ge 1 ]; do
if [ "$1" = "-n" ]; then
shift
DOMAIN="$1"
DA_ARGS="$DA_ARGS -n $1"
elif [ "$1" = "--extra-arg" ]; then
shift
EXTRA_ARGS="$EXTRA_ARGS
$1"
else
DA_ARGS="$DA_ARGS $1"
fi
shift
done
if [ "$DOMAIN" = "" ]; then
DOMAIN=`hostname`
fi
#
# Create a temporary configuration file...
#
TMP_CONF_FILE="/tmp/webalizer.$DOMAIN"
cat > $TMP_CONF_FILE <<END_OF_TEXT
GMTTime yes
VisitTimeout 1800
DNSCache /var/www/usage/dns_cache.db
DNSChildren 10
PageType htm*
PageType cgi
PageType txt
PageType *html
PageType php*
PageType asp*
PageType pl
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG
HideURL *.ra
TopAgents 30
AllAgents yes
TopCountries 30
TopReferrers 30
AllReferrers yes
TopSites 30
TopKSites 20
AllSites yes
TopURLs 30
TopKURLs 20
AllURLs yes
TopEntry 30
TopExit 30
TopSearch 20
AllSearchStr yes
TopUsers 0
AllUsers no
IgnoreSite *$DOMAIN
IgnoreSite localhost
IgnoreReferrer *$DOMAIN/*
HideReferrer Direct Request
$EXTRA_ARGS
END_OF_TEXT
#
# Launch the 'real' webalizer. Please, check out the webalizer's README ;-)
#
/usr/bin/webalizer-orig -c $TMP_CONF_FILE $DA_ARGS
#
# Remove the temporary configuration file...
#
if [ -f $TMP_CONF_FILE ]; then
# cat $TMP_CONF_FILE
rm -f $TMP_CONF_FILE
fi
#! /bin/bash
# update access statistics for the web site
if [ -s /var/log/httpd/homedir.log ] ; then
/usr/bin/webalizer -p -n server.example.com -o /var/www/usage /var/log/httpd/homedir.log
fi
exit 0