-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