How to manage Awstats with specific domains

nicsopon

Verified User
Joined
Jul 4, 2006
Messages
101
Hi

Awstats runs for 14 hours on my server and I need a solution to manage awstats to run only with only some domains.

I resolve this problem with the best support from DirectAdmin Staff.

I hope this will be usefull for the other DirectAdmin Users. Do as follows:

  • Create a file with "vi /home/admin/scripts/awstats.list" use admin so that it will be store in your backup for future usage.
  • Enter all domains you want to create stats. For example:
    domain1.com
    domain2.com
    domain3.com
    Save it when you finished.
  • vi /usr/local/directadmin/scripts/awstats_process.sh
  • Add this lines under DOMAIN=$2
    PRESENT=`grep -c -e "^$DOMAIN\$" /home/admin/scripts/awstats.list`
    if [ "$PRESENT" -eq 0 ]; then
    echo "not running awstats for $DOMAIN";
    exit 0;
    fi
  • Save it.

Now, when the cron run awstats it will work only with your selected domains as expected.
You can see the result after the next awstats runs next time.

Best Regards
 
I've moved your thread to the How-To subforum.

It looks good. I hope others will try it and discuss any issues.

Jeff
 
Back
Top