?
Current Path : /usr/local/bin/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current 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}"