Created
November 10, 2015 16:34
-
-
Save manjeshpv/e81990c668d89a7ddd40 to your computer and use it in GitHub Desktop.
Script to enable awstats for easyengine- $ ./awstats.sh mydomain.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -eq 0 ] | |
then | |
echo "No arguments supplied" | |
else | |
echo $1 | |
cp /etc/awstats/awstats.sample.conf /etc/awstats/awstats.$1.conf | |
sed -i -e 's/XDOMAIN/'"$1"'/g' /etc/awstats/awstats.$1.conf | |
mkdir /var/lib/awstats/$1 | |
echo '/usr/share/awstats/tools/awstats_buildstaticpages.pl -update -config='$1' -dir=/var/www/awstats.ayyayo.com/htdocs -awstatsprog=/usr/lib/cgi-bin/awstats.pl > /dev/null' >> /var/bin/awstats/awstats_update | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment