PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/self/root/opt/imh-atop/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/self/root/opt/imh-atop/netatop_inst.sh

#!/bin/bash
# Installs netatop kernel module
# This would be a package but it needs to install the kernel-devel-$(uname -r) packages

VERSION=$(cat /opt/imh-atop/netatop_version)

#Make sure the versions of devel and headers for the current kernel are installed too
if grep -q cloudlinux /etc/os-release
then
    yum -y install kernel-devel-$(uname -r) dkms gcc make kernel-headers
fi

if grep -qi virtuozzo /etc/os-release
then
    yum -y install vzkernel-devel-$(uname -r) vzkernel-devel dkms gcc make kernel-headers
fi

if grep -q ubuntu /etc/os-release
then
    apt-get -y install linux-headers-$(uname -r) dkms gcc make
fi

rm -rf /var/lib/dkms/netatop/${VERSION}
mkdir -p /opt/imh-atop
cd /opt/imh-atop
wget https://www.atoptool.nl/download/netatop-${VERSION}.tar.gz
cd /usr/src/
tar xf /opt/imh-atop/netatop-${VERSION}.tar.gz
cd netatop-${VERSION}
make
make install
dkms install netatop/${VERSION}

mkdir -p /etc/systemd/system/netatop.service.d/
cat > /etc/systemd/system/netatop.service.d/override.conf << EOF
[Unit]
ConditionPathExists=/opt/imh-atop/enabled
EOF

cat > /etc/systemd/system/atop.service.d/override.conf << EOF
[Unit]
ConditionPathExists=/opt/imh-atop/enabled
Wants=netatop.service
EOF

systemctl daemon-reload
systemctl enable netatop
systemctl start netatop
systemctl enable atop.service
systemctl stop atop.service
systemctl start atop.service