#!/bin/sh
logdb=`uci get weathermon.process.logdb`
-dumpdir=`uci get weathermon.process.working_dir`/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