CURDIR=`dirname "$0"` cd $CURDIR CURDIR=`pwd` LSWSHOME=`dirname $CURDIR` LSWSHOME=`dirname $LSWSHOME` INST_USER=`id` INST_USER=`expr "$INST_USER" : 'uid=.*(\(.*\)) gid=.*'` AWS_VER=7.9 cd $LSWSHOME/add-ons if [ -f $LSWSHOME/add-ons/awstats-$AWS_VER/wwwroot/cgi-bin/awstats.pl ]; then echo "[INFO] Found AWStats $AWS_VER at $LSWSHOME/add-ons/awstats-$AWS_VER." else if [ ! -f $LSWSHOME/add-ons/awstats-$AWS_VER.tar.gz ]; then wget --timeout=5 "http://prdownloads.sourceforge.net/sourceforge/awstats/awstats-$AWS_VER.tar.gz" if [ $? -ne 0 ]; then echo "WGET failed, try curl" curl -L "http://prdownloads.sourceforge.net/sourceforge/awstats/awstats-$AWS_VER.tar.gz" -o awstats-$AWS_VER.tar.gz if [ $? -ne 0 ]; then curl -L "http://prdownloads.sourceforge.net/sourceforge/awstats/awstats-$AWS_VER.tar.gz" -o awstats-$AWS_VER.tar.gz if [ $? -ne 0 ]; then cat <