sync: Update malware-scanner with individual installer functions and fallback download sources

This commit is contained in:
cschantz
2026-04-21 19:17:38 -04:00
parent c072942a3c
commit 93ca221ba2
+16 -4
View File
@@ -222,8 +222,20 @@ install_all_scanners() {
echo -e "${GREEN}✓ ClamAV already installed (cPanel)${NC}"
else
echo " → Installing via cPanel package manager..."
/scripts/update_local_rpm_versions --edit target_settings.clamav installed 2>/dev/null || true
/scripts/check_cpanel_rpms --fix --targets=clamav 2>&1 | tail -3
# Check if cPanel scripts exist before using them
if [ -f "/scripts/update_local_rpm_versions" ] && [ -f "/scripts/check_cpanel_rpms" ]; then
/scripts/update_local_rpm_versions --edit target_settings.clamav installed 2>/dev/null || true
if ! /scripts/check_cpanel_rpms --fix --targets=clamav 2>&1 | tail -3; then
# cPanel scripts failed, fall back to standard yum
echo " → cPanel package manager unavailable, trying standard yum..."
yum install -y clamav clamav-update 2>&1 | grep -E "Installing|Installed|already" || echo " (installation in progress)"
fi
else
# cPanel scripts don't exist, fall back to standard yum
echo " → cPanel tools not available, using standard package manager..."
yum install -y clamav clamav-update 2>&1 | grep -E "Installing|Installed|already" || echo " (installation in progress)"
fi
fi
# IMPORTANT: Don't fall through to standard yum - cPanel packages conflict!
elif [ -f "/usr/local/psa/version" ]; then
@@ -2307,8 +2319,8 @@ show_scan_menu() {
fi
# Build reference database once for the entire menu session
if command -v build_reference_database &>/dev/null; then
build_reference_database 2>/dev/null || true
if command -v db_ensure_fresh &>/dev/null; then
db_ensure_fresh 2>/dev/null || true
clear
fi