HEX
Server: Apache
System: Linux sh00085.hostgator.com 5.14.0-687.29.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 23 16:18:48 EDT 2026 x86_64
User: yqegzjte (1064)
PHP: 8.5.8
Disabled: NONE
Upload Files
File: //usr/local/bin/eig_cache_enable
#!/bin/bash
_domain=$1
_user=$(whoami)
_home_dir=$(getent passwd ${_user} | awk -F: {'print $6'})
_base_path="${_home_dir}/.cpanel/proxy_conf"

if [[ -z ${1+x} || -z ${_user+x} || ${_user} == 'root' ]]; then
  exit 1
elif [[ -d "${_home_dir}" ]]; then
  _path_owner=$(stat -c '%U' "${_home_dir}")
  if [[ "${_user}" != "${_path_owner}" ]]; then
    exit 1
  fi
fi

if [[ ! -d "${_base_path}" ]]; then
  mkdir -p "${_base_path}"
fi

echo 'cache_level=2' > "${_base_path}/${_domain}"
touch "/etc/proxy_notify/${_user}"