Topic: [SOLVED] Awstats in Ubuntu 11.04
==== Provide basic information to help troubleshoot ====
- iRedMail version: 0.7.2
- Linux/BSD distribution name and version: Ubuntu 11.04
====
I noticed that awstats cronjobs weren't been executed successfully thus awstats not working correctly(Empty results).
Aug 9 03:10:01 ec2 CRON[9810]: (CRON) error (grandchild #9811 failed with exit status 1)
I have several messages like that.
I identified that in the installation "function/awstats.sh" script changed the awstats.pl file location(Line 35):
...
31 # Move awstats.pl to ${AWSTATS_CGI_DIR} on Debian/Ubuntu, so that it won't
32 # conflict with other cgi programs, e.g. mailman.
33 if [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" -o X"${DISTRO}" == X"SUSE" ]; then
34 mkdir -p ${AWSTATS_CGI_DIR}/awstats/ 2>/dev/null
35 mv ${AWSTATS_CGI_DIR}/awstats.pl ${AWSTATS_CGI_DIR}/awstats/ 2>/dev/null
36 export AWSTATS_CGI_DIR="${AWSTATS_CGI_DIR}/awstats"
37 fi
...
But it didn't change other scripts as well.
I need to change those scripts:
File: /usr/share/awstats/tools/awstats_buildstaticpages.pl
root@ec2:[/usr/share/awstats/tools]:diff awstats_buildstaticpages.pl.orig awstats_buildstaticpages.pl
311,312c311,312
< elsif (-s "/usr/lib/cgi-bin/awstats.pl") {
< $Awstats="/usr/lib/cgi-bin/awstats.pl";
---
> elsif (-s "/usr/lib/cgi-bin/awstats/awstats.pl") {
> $Awstats="/usr/lib/cgi-bin/awstats/awstats.pl";
File: /usr/share/awstats/tools/buildstatic.sh
root@ec2:[/usr/share/awstats/tools]:diff buildstatic.sh.orig buildstatic.sh
11c11
< AWSTATS=/usr/lib/cgi-bin/awstats.pl
---
> AWSTATS=/usr/lib/cgi-bin/awstats/awstats.pl
File: /usr/share/awstats/tools/update.sh
root@ec2:[/usr/share/awstats/tools]:diff update.sh.orig update.sh
11c11
< AWSTATS=/usr/lib/cgi-bin/awstats.pl
---
> AWSTATS=/usr/lib/cgi-bin/awstats/awstats.pl
Basically I added the awstats to the paths...
Thanks!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.