Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
#!/usr/bin/env bash
set -o pipefail
set -o errexit
# Script to upgrade ImunifyAV and/or Imunify360
# bypassing gradual rollout
VERSION="1.1"
PACKAGES=''
PRODUCT_AV='imunify-antivirus'
PRODUCT_I360='imunify360-firewall'
IMUNIFY_ANTIVIRUS_PACKAGES="imunify-antivirus \
ai-bolit \
alt-common-release \
alt-php-hyperscan \
imunify-release \
imunify-common \
imunify-notifier \
imunify-core \
imunify-realtime-av \
imunify-ui \
imunify360-venv \
alt-php-internal \
app-version-detector"
IMUNIFY360_FIREWALL_PACKAGES="imunify360-firewall \
imunify-antivirus \
ai-bolit \
alt-common-release \
alt-php-hyperscan \
imunify-release \
imunify-common \
imunify-notifier \
imunify-core \
imunify-realtime-av \
imunify-ui \
imunify360-venv \
cloudlinux-backup-utils \
imunify360-ossec \
imunify360-pam \
imunify360-php-i360 \
imunify360-webshield-bundle \
imunify360-unified-access-logger \
alt-php-internal \
app-version-detector"
IMUNIFY360_FIREWALL_RPM_ONLY_PACKAGES="imunify-auditd-log-reader \
minidaemon"
IMUNIFY_ANTIVIRUS_RPM_ONLY_PACKAGES="minidaemon"
detect_ostype()
{
if [ ! -f /etc/os-release ]
then
OSTYPE=centos
else
source /etc/os-release
if echo $ID $ID_LIKE | grep debian >/dev/null
then
OSTYPE=debian
else
OSTYPE=centos
fi
fi
}
detect_product_debian() {
if dpkg -l "$PRODUCT_AV" 2>/dev/null | grep -E -q "^.i\s+${PRODUCT_AV}"; then
PACKAGES="$IMUNIFY_ANTIVIRUS_PACKAGES"
fi
if dpkg -l "$PRODUCT_I360" 2>/dev/null | grep -E -q "^.i\s+${PRODUCT_I360}"; then
PACKAGES="$IMUNIFY360_FIREWALL_PACKAGES"
fi
}
detect_product_centos() {
if rpm -q "${PRODUCT_AV}" >/dev/null; then
PACKAGES="$IMUNIFY_ANTIVIRUS_PACKAGES \
$IMUNIFY_ANTIVIRUS_RPM_ONLY_PACKAGES"
fi
if rpm -q "${PRODUCT_I360}" >/dev/null; then
PACKAGES="$IMUNIFY360_FIREWALL_PACKAGES \
$IMUNIFY360_FIREWALL_RPM_ONLY_PACKAGES"
fi
}
update_centos()
{
yum -y update $PACKAGES --enablerepo="imunify360-rollout-*-bypass"
if rpm -qi imunify-patchman &>/dev/null; then # optional
yum -y update imunify-patchman --setopt=obsoletes=0 --enablerepo="imunify360-rollout-*-bypass" || true
fi
}
update_debian()
{
if dpkg-query -s imunify-patchman &>/dev/null; then # optional
PACKAGES="$PACKAGES imunify-patchman"
fi
PACKAGES="$(dpkg-query -W -f='${binary:Package}\n' $PACKAGES 2>/dev/null || true)"
# first enable rollout bypass repos
APT_REPO_PATH="/etc/apt/sources.list.d/imunify-rollout-bypass.list"
UPDATE_PARAMS=''
cp "${APT_REPO_PATH}.disabled" $APT_REPO_PATH
apt-get update
# unhold packages before upgrade to allow update
apt-mark unhold "$PACKAGES" 2>/dev/null || true
# for silent mode
# force save old config files. new files will be saved by dpkg
if [ "$DEBIAN_FRONTEND" == "noninteractive" ]; then
# see dpkg options https://man7.org/linux/man-pages/man1/dpkg.1.html
# the same options as in the daily update cronjob
/dev/null || true
rm $APT_REPO_PATH
}
detect_ostype
detect_product_${OSTYPE}
if [ -z "$PACKAGES" ]; then
echo "Neither ImunifyAV nor Imunify360 found installed"
exit 1
fi
update_${OSTYPE}