#!/bin/bash

   DOMO_IP="192.168.1.3"             # Domoticz IP Address
   DOMO_PORT="81"                    # Domoticz Port
   IDX=331

nice -n 0 clamscan -r -i --max-filesize=100M --exclude "\.(CR2|cr2|info|xmp|java|class|o|epub|xml|vdi|log|img|IMG|flac|mp4|mp3|mov|flv|mkv|avi|AVI|MKV|MP4|MP3|MOV|mpg|MPG|jpg|JPG|nfo|png|PNG|html|htm|HTM|HTML|idx|gif|txt|TXT|java|php|htm|html)$" --cross-fs=no  /media/Backup/ >/tmp/clamscanWDBlue.txt

virus=`cat /tmp/clamscanWDBlue.txt |grep FOUND|wc -l`

curl -y 1 -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$IDX&nvalue=0&svalue=$virus" &

exit 0
