Server : Apache
System : Linux vps-1289444.devslamantis.cl 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User : vspt ( 1013)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/24182/root/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //proc/24182/root/bin/backuply
#!/bin/bash

# Assume we run without the wrapper by default.
USE_CGROUP_WRAPPER=false

# Check if the --enduser_backup flag is passed.
for arg in "$@"; do
	
	# If it is, check if either cgroup v1 or v2 is available.
	if [[ "$arg" == "--enduser_backup" || "$arg" == "--enduser_restore" ]]; then
		if [[ (-f /sys/fs/cgroup/cgroup.controllers || ( -d /sys/fs/cgroup/cpu && -d /sys/fs/cgroup/memory && -d /sys/fs/cgroup/blkio )) && -f /var/backuply/conf/resource_limits_enabled ]]; then
			
			USE_CGROUP_WRAPPER=true
			
		fi
		
		# Since we found the flag, we can stop looping.
		break
	fi
done

# Use the cgroup wrapper. The wrapper itself will handle v1/v2 differences.
if [[ "$USE_CGROUP_WRAPPER" == true ]]; then
    
	/usr/local/backuply/bin/backuply-cgroup /usr/local/backuply/bin/php /usr/local/backuply/cli.php "$@"

# Run the command directly without the wrapper.
else
    /usr/local/backuply/bin/php /usr/local/backuply/cli.php "$@"
fi

F1le Man4ger