26 lines
573 B
Bash
26 lines
573 B
Bash
#!/bin/sh
|
|
case "${1}" in
|
|
version )
|
|
echo "stage: ${1}"
|
|
clamscan --version
|
|
clamconf | sed -ne '/Database information/,/^$/p'
|
|
for file in /var/lib/clamav/* ;
|
|
do
|
|
(clamscan -d $file /proc/cmdline > /dev/null 2>&1) && echo "+ ${file}" || echo "Bad Signaturefile ${file}"
|
|
done
|
|
echo "$(sigtool --list-sigs | wc -l) Signatures loaded"
|
|
|
|
;;
|
|
scan )
|
|
echo "stage: ${1}"
|
|
echo "Starting Scan of /data:"
|
|
clamscan -ir /data
|
|
;;
|
|
* )
|
|
echo "stage: ${1}"
|
|
echo "Usage:"
|
|
clamscan --help | head -n 20
|
|
/bin/sh
|
|
;;
|
|
esac
|