#!/bin/sh
logdb=`uci get weathermon.process.logdb`
-dumpdir=/var/weather/www
-mkdir -p $dumpdir
-/usr/bin/weather-filter $logdb dump-compacted - $dumpdir
+
+if [ -f "$logdb" ]; then
+
+ dumpdir=`uci get weathermon.process.working_dir`/www
+ mkdir -p $dumpdir
+ /usr/bin/weather-filter $logdb dump-compacted - $dumpdir
+
+fi