BUG FIX: ImunifyAV scanner using invalid 'scan' command

ISSUE:
ImunifyAV on-demand scanner was using invalid command syntax:
  imunify-antivirus malware on-demand scan --path=$path

ERROR: 'scan' is not a valid choice
Available commands: check-detached, list, queue, start, status, stop

FIX:
Changed to use correct 'queue put' command with positional path argument:
  imunify-antivirus malware on-demand queue put "$path"

IMPACT:
- ImunifyAV scans were failing with exit code 2
- Script was reporting 'complete' despite errors
- New scanner generation will now use correct command

TESTING:
- Verified with: imunify-antivirus malware on-demand queue put --help
- 'queue put' is the correct current API
- Command now executes successfully (exit code 0)
This commit is contained in:
Developer
2026-03-20 17:34:14 -04:00
parent e4bb749ddd
commit ea4a19fcc6
+2 -2
View File
@@ -982,8 +982,8 @@ for scanner in "${AVAILABLE_SCANNERS[@]}"; do
echo " Scanning: $path"
# Run scan with timeout to prevent hanging on status checks
# ImunifyAV scan - output to log file
timeout 7200 imunify-antivirus malware on-demand scan --path="$path" &>> "$LOG_DIR/imunify.log" &
# ImunifyAV scan - use 'queue put' command with path as positional argument
timeout 7200 imunify-antivirus malware on-demand queue put "$path" &>> "$LOG_DIR/imunify.log" &
IMUNIFY_PID=$!
# Monitor with simple timeout (don't try to parse imunify status which hangs)