#!/bin/bash
#
# Use this script to update from 0.1 to 0.2!
# If You modified the HTML_pages coming with xmailgraph0.1
# you MUST make a backup of them first, because they will be replaced!


# adjust to your httpds doc_root
HTTP_ROOT=/tmp/www

# HTTP_ROOT=/var/www 		# default debian
# HTTP_ROOT=/srv/www/htdocs 	# default SuSE
# HTTP_ROOT=/var/www/html	# default RedHat


echo "Copying xmailgraph.pl to /var/MailRoot/bin/"
cp xmailgraph.pl /var/MailRoot/bin/


echo "Copying ALL html-files"
cp *.html $HTTP_ROOT/xmailgraph/
cp *.gif $HTTP_ROOT/xmailgraph/

echo "Creating new RRDs"

rrdtool create /var/MailRoot/logs/WN_xmail_antivirus.rrd --start -601 --step 600 \
 DS:virus:ABSOLUTE:1200:0:U \
 RRA:AVERAGE:0.5:1:198 RRA:AVERAGE:0.5:7:198 RRA:AVERAGE:0.5:35:198 RRA:AVERAGE:0.5:385:198 \
 RRA:MAX:0.5:1:198 RRA:MAX:0.5:7:198 RRA:MAX:0.5:35:198 RRA:MAX:0.5:385:198

echo "finished!"
echo " "
echo "Please Take a Look to /var/MailRoot/bin/xmailgraph.pl and "
echo "adjust at least the vars hostname, dir_of_pngs and others "
echo "if needed!"
echo " "
echo "have a lot of fun..."


