1 | 1 | simandl | #!/bin/sh |
2 | | | |
3 | | | # (c)2003 by Jan Krupa (krupaj@mobilnews.cz) |
4 | | | # http://www.mobilnews.cz/honza/ |
5 | | | |
6 | | | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin |
7 | | | export PATH |
8 | | | |
9 | | | STATS_PATH=/home/www/cgi-bin/netmap |
10 | | | STATS_PATH_DATA=$STATS_PATH/data |
11 | | | STATS_PATH_OUT=$STATS_PATH/out |
12 | | | STATS_PATH_TMP=$STATS_PATH/tmp |
13 | | | PHP_PATH=/usr/bin/php |
14 | | | |
15 | | | # STATS_TYPE can be ping, fping or nmap |
16 | | | STATS_TYPE=ping |
17 | | | |
18 | | | $STATS_PATH/gen_onestat_$STATS_TYPE $STATS_PATH_DATA/$1.comp > $STATS_PATH_DATA/$1.state |
19 | | | $PHP_PATH -q $STATS_PATH/calstats.php $STATS_PATH_DATA/$1 > $STATS_PATH_TMP/$1.png |
20 | | | /bin/mv -f $STATS_PATH_TMP/$1.png $STATS_PATH_OUT |