wiki:skripte:webalizer

Automatisches Anlegen einer Webalizer Struktur für mehrere vhosts

webalizer.sh
#!/bin/bash
 
root_webalizer="/var/www/intern/webalizer/"
 
for vhost in <vhost1> <vhost2> <vhost...>
do
        echo -e "\nHost: $vhost\n"
        for log in /var/log/apache2/$vhost-access.log /var/log/apache2/$vhost-access.log.1
        do
                if [ ! -d $root_webalizer/$vhost ]
                then
                        mkdir -p $root_webalizer/$vhost
                fi
 
                webalizer -v $log -o $root_webalizer/$vhost/
                #/var/www/intern/test-own/
        done
done
 
# Irgendwas laeuft beim ersten Start des Tages falsch
# Deshalb wird das falsche geloescht
rm $root_webalizer/*.png
rm $root_webalizer/*.html
Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   __ __  _      __   ___    ___   _____
  / // / | | /| / /  / _ \  / _ ) / ___/
 / _  /  | |/ |/ /  / // / / _  |/ (_ / 
/_//_/   |__/|__/  /____/ /____/ \___/
 
  • wiki/skripte/webalizer.txt
  • Zuletzt geändert: 2014/11/27 10:04
  • von wikiadmin