From ec1755b508b14b65298a4e7179c904415fb933ea Mon Sep 17 00:00:00 2001 From: cschantz Date: Tue, 11 Nov 2025 21:19:14 -0500 Subject: [PATCH] Improve ImunifyAV installation with better progress display Changes: - Show 'please wait' message for long installation - Display installation progress from deployment script - Clean up any existing deployment script first - Show relevant output: Installing/Installed/Complete/Error - Remove suppression of all output This should make ImunifyAV installation more visible and debuggable. --- modules/security/malware-scanner.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 9c614e3..a481330 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -221,23 +221,28 @@ install_all_scanners() { # Install ImunifyAV (FREE version) if ! is_imunify_installed; then echo -e "${CYAN}[3/3] Installing ImunifyAV (FREE)...${NC}" + echo " This may take several minutes - please wait..." - # Try cPanel method first - if command -v yum &>/dev/null && [ -f "/usr/local/cpanel/cpanel" ]; then - yum install -y imunify-antivirus imunify-antivirus-cpanel &>/dev/null + # Use deployment script method (most reliable) + cd /tmp + if [ -f "imav-deploy.sh" ]; then + rm -f imav-deploy.sh + fi - # Enable cPanel UI plugin + wget -q https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh + + if [ -f imav-deploy.sh ]; then + # Run deployment script with progress indicators + bash imav-deploy.sh 2>&1 | grep -E "Installing|Installed|Complete|Error|Failed" || bash imav-deploy.sh + rm -f imav-deploy.sh + + # Enable cPanel UI plugin if installed if [ -f "/opt/alt/python35/share/imunify360/scripts/av-userside-plugin.sh" ]; then + echo " → Enabling cPanel UI plugin..." /opt/alt/python35/share/imunify360/scripts/av-userside-plugin.sh &>/dev/null fi else - # Fallback to script method - cd /tmp - wget -q https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh - if [ -f imav-deploy.sh ]; then - bash imav-deploy.sh &>/dev/null - rm -f imav-deploy.sh - fi + echo -e "${RED} Failed to download installation script${NC}" fi if is_imunify_installed; then