View Single Post
  #110  
Old 4th January 2007, 23:23
4integration 4integration is offline
Member
 
Join Date: Dec 2006
Posts: 44
Thanks: 0
Thanked 2 Times in 1 Post
Default

I made a small modification of install.sh because the script didn't backup my httpd.conf. My version looks as:
Code:
#!/bin/sh
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


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

# First backup the Apache configuration
# Adding Apache Alias (Very experimental)
# Restart Apache
if [[ -e /etc/apache2/apache2.conf ]]
then
  cp -p /etc/apache2/apache2.conf /etc/apache2/apache2.conf.ispcfg_awstats_bkup
  sed -i -f apache.sed /etc/apache2/apache2.conf
  /etc/init.d/apache2 restart
elif [[ -e /etc/httpd/conf/httpd.conf ]]
then
  cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.ispcfg_awstats_bkup
  sed -i -f apache.sed /etc/httpd/conf/httpd.conf
  /etc/init.d/httpd restart
elif [[ -e /etc/apache2/default-server.conf ]]
then
  cp -p /etc/apache2/default-server.conf /etc/apache2/default-server.conf.ispcfg_awstats_bkup
  sed -i -f apache.sed /etc/apache2/default-server.conf
  /etc/init.d/apache2 restart
fi

# Adding a Cron Job
crontab -l > /tmp/crontab.lst
sed -i -f crontab.sed /tmp/crontab.lst
crontab /tmp/crontab.lst
__________________
Best Regards
4 Integration
Reply With Quote