1 | 1 | simandl | #!/usr/bin/env sh |
2 | | | |
3 | | | . ../../settings |
4 | | | |
5 | | | FIRSTFILE=`ls rrd/|head -n 1` |
6 | | | |
7 | | | if [ `$BINPATH/rrdtool info rrd/$FIRSTFILE|grep -c ABSOLUTE` -gt 0 ]; then |
8 | | | |
9 | | | echo "old-style databases found, update necessary."; |
10 | | | |
11 | | | # update databases if needed |
12 | | | # |
13 | | | FILES=`ls rrd` |
14 | | | for nn in $FILES; do |
15 | | | echo "updating $nn" |
16 | | | $BINPATH/rrdtool tune rrd/$nn -d racc:COUNTER -d wacc:COUNTER -d rbyt:COUNTER -d wbyt:COUNTER |
17 | | | done |
18 | | | fi |
19 | | | |
20 | | | |
21 | | | if [ `$BINPATH/rrdtool info rrd/$FIRSTFILE|grep max|grep -c NaN` -gt 0 ]; then |
22 | | | |
23 | | | echo "old-style databases found, update necessary."; |
24 | | | |
25 | | | # update databases if needed |
26 | | | # |
27 | | | FILES=`ls rrd` |
28 | | | for nn in $FILES; do |
29 | | | echo "updating $nn" |
30 | | | $BINPATH/rrdtool tune rrd/$nn -a racc:50000 -a wacc:50000 -a rbyt:50000000 -a wbyt:50000000 |
31 | | | done |
32 | | | fi |
33 | | | |
34 | | | echo "rebuilding webpage..." |
35 | | | cd ../.. |
36 | | | ./makeindex.pl |
37 | | | |