1 | 1 | simandl | #!/usr/bin/env sh |
2 | | | |
3 | | | . ../../settings |
4 | | | |
5 | | | if [ `$BINPATH/rrdtool info rrd/proc.rrd |grep max |grep -cv NaN` -gt 0 ]; then |
6 | | | |
7 | | | echo "old-style databases found, update necessary."; |
8 | | | |
9 | | | # update databases if needed |
10 | | | # |
11 | | | $BINPATH/rrdtool tune rrd/proc.rrd -a procslp:U -a procrun:U -a proczmb:U -a procstp:U -a procdsc:U |
12 | | | fi |
13 | | | |
14 | | | # recompile read-data.pl if needed |
15 | | | # |
16 | | | if [ read-data.pl -nt read-data ]; then |
17 | | | echo "script update detected, recompiling..." |
18 | | | rm -f read-data |
19 | | | perlcc read-data.pl |
20 | | | fi |
21 | | | |
22 | | | if [ -e rrd/loadavg.rrd ]; then |
23 | | | echo "old DBname detected, renaming..." |
24 | | | mv -f rrd/loadavg.rrd rrd/load.rrd |
25 | | | cd ../.. |
26 | | | ./makeindex.pl |
27 | | | fi |
28 | | | |