����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/usr/bin/bash
#
# Set or unset systemd service resource properties
#
# Usage: set-service-resources.sh SERVICE_NAME CPU_QUOTA MEMORY_HIGH
#
# Arguments:
# SERVICE_NAME - Name of the systemd service (e.g., "imunify360.service")
# CPU_QUOTA - CPU quota value (e.g., "50" for 50%) or empty to unset
# MEMORY_HIGH - Memory high value (e.g., "50" for 50%) or empty to unset
#
# Examples:
# set-service-resources.sh imunify360.service 50 50 # Set limits
# set-service-resources.sh imunify360.service "" "" # Unset limits
#
set -e
if [[ $# -ne 3 ]]; then
echo "Usage: $0 SERVICE_NAME CPU_QUOTA MEMORY_HIGH" >&2
echo "Example: $0 imunify360.service 50% 50%" >&2
echo "Example: $0 imunify360.service \"\" \"\" # to unset" >&2
exit 1
fi
SERVICE_NAME="$1"
CPU_QUOTA="$2"
MEMORY_HIGH="$3"
if [[ -z "$SERVICE_NAME" ]]; then
echo "Error: SERVICE_NAME cannot be empty" >&2
exit 1
fi
get_systemd_version() {
/bin/systemctl --version | head -n1 | grep -oE '[0-9]+' | head -n1
}
SYSTEMD_VERSION=$(get_systemd_version)
MEMORY_HIGH_MIN_VERSION=232
if [[ -n "$CPU_QUOTA" ]]; then
echo "$SERVICE_NAME: Setting CPUQuota=$CPU_QUOTA%"
/bin/systemctl set-property --runtime "$SERVICE_NAME" CPUQuota="$CPU_QUOTA%"
else
echo "$SERVICE_NAME: Unsetting CPUQuota"
/bin/systemctl set-property --runtime "$SERVICE_NAME" CPUQuota=
fi
if [[ "$SYSTEMD_VERSION" -ge "$MEMORY_HIGH_MIN_VERSION" ]]; then
if [[ -n "$MEMORY_HIGH" ]]; then
echo "$SERVICE_NAME: Setting MemoryHigh=$MEMORY_HIGH%"
/bin/systemctl set-property --runtime "$SERVICE_NAME" MemoryHigh="$MEMORY_HIGH%"
else
echo "$SERVICE_NAME: Unsetting MemoryHigh"
/bin/systemctl set-property --runtime "$SERVICE_NAME" MemoryHigh=
fi
else
if [[ -n "$MEMORY_HIGH" ]]; then
echo "$SERVICE_NAME: MemoryHigh not supported on systemd v${SYSTEMD_VERSION} (requires v${MEMORY_HIGH_MIN_VERSION}+), skipping"
fi
fi
echo "$SERVICE_NAME: Resource configuration completed"
exit 0
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| modsec_scan.py | File | 882 B | 0755 |
|
| modsec_scan_real.py | File | 2.36 KB | 0755 |
|
| pureftpd-on-upload | File | 4.36 MB | 0755 |
|
| set-service-resources.sh | File | 1.98 KB | 0755 |
|
| wp-capability-check | File | 7.3 MB | 0755 |
|