jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [mailq/] [update] - Rev 15 Go to most recent revision

Compare with Previous - Blame - Download


#!/usr/bin/env sh

. ../../settings

FIRSTFILE=`ls rrd/|head -n 1`

if [ `$BINPATH/rrdtool info rrd/$FIRSTFILE|grep -c msrefused` -eq 0 ]; then

  echo "old-style databases found, update necessary.";

# update databases if needed
#
  FILES=`ls rrd`
  for nn in $FILES; do
    echo "updating $nn"
    $BINPATH/rrdtool dump rrd/$nn | ../../tools/rrdtool_add_ds.pl 1 nan GAUGE > rrd/temp.xml
    $BINPATH/rrdtool restore rrd/temp.xml rrd/temp.rrd
    rm -f rrd/temp.xml
    $BINPATH/rrdtool tune rrd/temp.rrd -r refused:crefused -r ds1:msrefused
    mv -f rrd/temp.rrd rrd/$nn
    done
  fi


Powered by WebSVN 2.2.1