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