first commit
This commit is contained in:
15
clamscanfulldomoticz.sh
Executable file
15
clamscanfulldomoticz.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOMO_IP="localhost" # Domoticz IP Address
|
||||
DOMO_PORT="81" # Domoticz Port
|
||||
IDX=330
|
||||
|
||||
lockfile-create --lock-name "/tmp/clamscanfulldomoticz.lockfile"
|
||||
nice -n 12 clamscan -r -i --max-filesize=10M --exclude=/media --exclude "\.(CR2|TIF|tif|img|IMG|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)$" --cross-fs=no / >/tmp/clamscanFullDomoticz.txt
|
||||
|
||||
virus=`cat /tmp/clamscanFullDomoticz.txt |grep FOUND|wc -l`
|
||||
|
||||
curl -y 1 -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command¶m=udevice&idx=$IDX&nvalue=0&svalue=$virus" &
|
||||
lockfile-remove --lock-name "/tmp/clamscanfulldomoticz.lockfile"
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user