AnonSec Shell
Server IP : 162.0.209.157  /  Your IP : 3.147.45.159   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux premium178.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : balaoqob ( 2395)
PHP Version : 8.0.30
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/imunify360/venv/share/imunify360/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/imunify360/venv/share/imunify360/scripts/imunify-disable-cpu-accounting.sh
#!/bin/bash

UNIT_DIR="/etc/systemd/system"

# Function to create the override file for a systemd unit
create_override() {
  local unit_name="$1"
  local override_path="$UNIT_DIR/$unit_name.d/override.conf"

  # Create the directory for the override file
  mkdir -p "$UNIT_DIR/$unit_name.d"

  # Create the override.conf file
  tee "$override_path" > /dev/null <<EOF
[Service]
CPUAccounting=false
EOF

  echo "Override created for $unit_name"
}

# Get all of systemd services
services=$(systemctl list-units --type=service --all --no-pager --no-legend | awk '{print $1}')

for service in $services; do
  if systemctl show --property=Slice "$service" | grep "Slice=Imunify"; then
    echo "CPUAccounting disabled for $service"
    create_override "$service"
  fi
done

systemctl daemon-reload

Anon7 - 2022
AnonSec Team