From 3c3556cb18a8a93211785d4513bb67a800ecd301 Mon Sep 17 00:00:00 2001 From: cschantz Date: Tue, 11 Nov 2025 19:20:54 -0500 Subject: [PATCH] Improve signature updates: automatic, visible, immediate Enhancements: - All scanners now update signatures immediately after installation - Signature updates are visible with progress messages - Show relevant output from update commands - Graceful fallback if update output parsing fails Updates per scanner: 1. ClamAV: - freshclam runs immediately post-install - Shows "updated", "Downloaded", or "up-to-date" messages - Confirms with green checkmark 2. Maldet: - maldet -u runs immediately post-install - Shows "update completed" or signature count - Confirms with green checkmark 3. ImunifyAV: - imunify-antivirus update runs immediately post-install - Shows "updated", "Success", or "completed" messages - Confirms with green checkmark User feedback addressed: Signatures should update automatically right after installation, not silently in background. --- modules/security/malware-scanner.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 26c393e..a993e02 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -149,10 +149,12 @@ install_all_scanners() { if command -v clamscan &>/dev/null; then echo -e "${GREEN}✓ ClamAV installed${NC}" - # Update signatures + + # Update virus signatures immediately if command -v freshclam &>/dev/null; then - echo " Updating virus signatures..." - freshclam &>/dev/null || true + echo " → Updating virus signatures (this may take a moment)..." + freshclam 2>&1 | grep -E "updated|Downloaded|up-to-date" || freshclam &>/dev/null + echo -e " ${GREEN}✓${NC} Signatures updated" fi else echo -e "${RED}✗ ClamAV installation failed${NC}" @@ -180,9 +182,11 @@ install_all_scanners() { if command -v maldet &>/dev/null; then echo -e "${GREEN}✓ Maldet installed${NC}" - # Update signatures - echo " Updating signatures..." - maldet -u &>/dev/null || true + + # Update malware signatures immediately + echo " → Updating malware signatures..." + maldet -u 2>&1 | grep -E "update completed|signatures" || maldet -u &>/dev/null + echo -e " ${GREEN}✓${NC} Signatures updated" else echo -e "${RED}✗ Maldet installation failed${NC}" fi @@ -217,6 +221,11 @@ install_all_scanners() { if command -v imunify-antivirus &>/dev/null; then echo -e "${GREEN}✓ ImunifyAV (FREE) installed${NC}" echo " No license key required - this is the FREE version" + + # Update malware signatures immediately + echo " → Updating malware signatures..." + imunify-antivirus update 2>&1 | grep -E "updated|Success|completed" || imunify-antivirus update &>/dev/null + echo -e " ${GREEN}✓${NC} Signatures updated" else echo -e "${RED}✗ ImunifyAV installation failed${NC}" fi