I'm trying to implement real time scanning on cPanel server.
When I use the following script,
#!/bin/bash
#Maximum file size to scan in bytes that's set to 10MB
MAXSIZE=10485760
if [ "$UPLOAD_SIZE" -le "$MAXSIZE" ]; then
/usr/bin/clamdscan --remove --quiet --no-summary "$1"
fi
Output shows,
line 4: [: : integer expression expected
((...))for arithmetics. Useif ((upload_size < maxsize)); then ...; fiAlso don't useUPPERCASEfor normal variable names.