It seems that everything works when the maps are generated using weathermap *script* when it's generated withing the folder, so I actually ended up with following script running every hour (probably I will modify it in a way that it only acts upon config change for particular map):
Code:
#!/bin/bash
#
path=/var/www/cacti/plugins/weathermap/
pathcfg=/var/www/cacti/plugins/weathermap/configs/
bin=/var/www/cacti/plugins/weathermap/weathermap
pathout=/var/www/cacti/plugins/weathermap/output/
mysql --skip-column-names --user='root' --password='XXXXX' --database='cacti' --execute='select configfile,filehash from weathermap_maps' > "$path"weathemap_maps_list
mapslist="$path"weathemap_maps_list
if [ -f $mapslist ]
then
while read maps
do
config=$(echo $maps | awk '{$NF=""; print $0}')
map=$(echo $maps | awk '{print $NF}')
cd /var/www/cacti/plugins/weathermap/
./weathermap --config configs/$config --output output/$map.png --htmloutput output/$map.html #--debug
sleep 5
convert -thumbnail 300x300 $pathout$map.png $pathout$map.thumb.png
done < $mapslist
fi