HEX
Server: LiteSpeed
System: Linux php-prod-3.spaceapp.ru 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: xnsbl7462 (1008)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //etc/cron.daily/imunify-antivirus
#!/bin/bash
#
# imunify-antivirus daily cron jobs.
#
# Usage:
#   ./imunify-antivirus.cron [<logfile>]
#
# if logfile is not specified, the output will be discarded
# If imunify360-firewall installed, doing nothing
log=${1:-/dev/null}

main()
{
    /usr/libexec/report-command-error /opt/imunify360/venv/bin/python3 /opt/imunify360/venv/share/imunify360/scripts/delay_on_cron_call.py

    echo "Checking if imunify360-firewall is installed"
    if dpkg -s imunify360-firewall; then
        echo "Imunify360-installed, skipping antivirus cron"
        exit 0
    fi

    echo "Starting daily imunify-antivirus cron jobs at $(date)"
    /usr/bin/imunify360-agent check-domains
    echo "imunify360-agent check-domains RC: $?"

    PACKAGES="imunify-antivirus \
              ai-bolit \
              alt-php-hyperscan \
              imunify-release \
              imunify-common \
              imunify-notifier \
              imunify-core \
              imunify-realtime-av \
              imunify-ui \
              imunify360-venv \
              imunify-patchman \
              alt-php-internal \
              app-version-detector"

    /usr/libexec/report-command-error \
        apt-get update -y
    echo "apt-get update RC: $?"
    export DEBCONF_NONINTERACTIVE_SEEN=true
    export DEBIAN_FRONTEND=noninteractive
    /usr/libexec/report-command-error \
        apt-get install --only-upgrade \
        -o "Dpkg::Lock::Timeout=600" \
        -o "Dpkg::Options::=--force-confdef" \
        -o "Dpkg::Options::=--force-confold" \
        -y $PACKAGES
    echo "apt-get install --only-upgrade RC: $?"

    /usr/bin/imunify-antivirus version
    echo "Finished daily imunify-antivirus cron jobs at $(date)"
}

main >> "$log" 2>&1