View Single Post
Old 30th January 2009, 23:21
DantePasquale DantePasquale is offline
Senior Member
Join Date: Feb 2007
Location: Lakewood, OH US
Posts: 108
Thanks: 10
Thanked 3 Times in 3 Posts
Send a message via AIM to DantePasquale

For some reason the awstats cron script was missing in my configuration, too. Luckily I have the original src still around and followed the script to see what was missing.

The first two lines of the script were all I had to do:

cd /usr/src/ISPConfig_awstats_pkg/
sudo cp awstats.php /root/ispconfig/scripts/shell/awstats.php
sudo chmod 644 /root/ispconfig/scripts/shell/awstats.php
Here's the entire for those that may no longer have that around:

mkdir /etc/awstats
cp awstats.shared.conf /etc/awstats/awstats.shared.conf
chmod 644 /etc/awstats/awstats.shared.conf
cp awstats.php /root/ispconfig/scripts/shell/awstats.php
chmod 644 /root/ispconfig/scripts/shell/awstats.php

# Backup the Apache configuration
cp -p /etc/apache2/apache2.conf /etc/apache2/apache2.conf.ispcfg_awstats_bkup

# Decompress Awstats in the /tools directory
tar xvfz awstats-6.7.tar.gz -C /home/admispconfig/ispconfig/tools
chmod 755 /home/admispconfig/ispconfig/tools/awstats-6.7/
ln -s /home/admispconfig/ispconfig/tools/awstats-6.7 /home/admispconfig/ispconfig/tools/awstats

# Adding Apache Alias (Very experimental)
if [[ -e /etc/apache2/apache2.conf ]]
  sed -i -f apache.sed /etc/apache2/apache2.conf
  /etc/init.d/apache2 restart
elif [[ -e /etc/httpd/conf/httpd.conf ]]
  sed -i -f apache.sed /etc/httpd/conf/httpd.conf
  /etc/init.d/httpd restart
elif [[ -e /etc/apache2/default-server.conf ]]
  sed -i -f apache.sed /etc/apache2/default-server.conf
  /etc/init.d/apache2 restart

# Adding a Cron Job
crontab -l > /tmp/crontab.lst
sed -i -f crontab.sed /tmp/crontab.lst
crontab /tmp/crontab.lst
Reply With Quote