awstatic.sh - Generate static awstats reports

Versione stampabileVersione stampabile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
 
# samu 2010-02-23
 
STATIC_DEST="/var/www/awstats/static"
 
cat > "$STATIC_DEST/index.html" << EOF
<html><head><title>AWSTATS - Static</title></head><body>
<h1>AWSTATS - Static Statistics</h1>
<ul>
EOF
 
for conf in $( ls /etc/awstats/ | grep "^awstats\..*\.conf\$" | sed "s/^awstats\.\(.*\).conf\$/\1/" ); do
  echo "Generating static pages for $conf ..."
  if [ ! -e "${STATIC_DEST}/${conf}" ]; then
    mkdir -p "${STATIC_DEST}/${conf}"
  fi
  /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl -dir="${STATIC_DEST}/${conf}" -config="$conf" -buildpdf 2>&1 | sed "s/^/  /"
  echo "<li><a href='${conf}/awstats.${conf}.html'>${conf}</a> [<a href='${conf}/awstats.${conf}.pdf'>PDF</a>]</li>" >> "$STATIC_DEST/index.html"
done
 
cat >> "$STATIC_DEST/index.html" << EOF
</ul>
<hr />
<div><em>Last update: $( date +"%F %T" )</em></div>
</body></html>
EOF

1 commento

 
Anonymous wrote 4 settimane 2 giorni ago

re

I will recommend not to wait until you get enough amount of cash to order different goods! You should take the www.lowest-rate-loans.com or credit loan and feel yourself free

Who Am I?

~redShadow~ A.K.A. Samuele Santi is an Italian Open Source developer, currently working as a freelance developer, mainly in the web applications sector. Favourite programming languages: PHP and, of course, Python!

caos (1) citroen (1) code (3) circuits (1) documentation (2) dmcrypt (1) backup (3) debug (1) arduino (1) algorythms (1) C++ (2) curl (1) cocktails (1) apt (1) awstats (3) Drupal (21) aoe (1) cars (1) e-mail (2) address book (2) blender (3) aircrack (1) doku (1) como lake rovers (1) audio (1) cryptography (1) 3d (3) contact manager (1) apache (1) development (11) cartoons (1) blogroll (7) database (3) archive (1) alcool (1) bash (11) 2v (1) camera mia (1) debian (1) Drupal Forms (1)