Server IP : 184.154.167.98 / Your IP : 3.147.78.185 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/cagefs/cpanel/ |
Upload File : |
#!/bin/bash # CageFS script to patch and rebuild suphp # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT . /opt/cloudlinux/venv/usr/share/python-cllib/scripts/cl-common common_path_of_cpanel="/usr/share/cagefs/cpanel" ROOT_UID=0 if [ "$UID" -ne "$ROOT_UID" ] then echo "ERROR: root privileges required" exit fi if is_ea4; then writeToLog "[CageFS] EasyApache 4 is active. Skip patching suphp" "$common_path_of_cpanel" exit 0 fi if ! /usr/bin/cldetect --cpanel-suphp-enabled; then writeToLog "[CageFS] SuPHP is disabled. Skip patching suphp" "$common_path_of_cpanel" exit 0 fi writeToLog "[CageFS] patch suphp" "$common_path_of_cpanel" # patch suphp log=$(getLogFile "$common_path_of_cpanel") easyApacheDir=$(getEasyApacheDir) currentpath=$(pwd) cd $common_path_of_cpanel suphp_source_found=0 if [ -e "suphp-0.7.1-cagefs.patch" ];then cd $easyApacheDir/src for dirname in ./suphp*; do if [ -d "$dirname/src" ];then suphp_source_found=1 echo $dirname >>$log cd $dirname/src patch -R -N -i $common_path_of_cpanel/suphp-0.7.1-cagefs.patch >/dev/null patch -N -i $common_path_of_cpanel/suphp-0.7.1-cagefs.patch 1>>$log 2>>$log if [ $? != 0 ];then echo "Error applying patch. Please, contact support at http://www.cloudlinux.com/support/" >>$log cd $currentpath exit 1 else echo "Patch was applied correctly..." >>$log fi break else echo "Error while rebuilding suphp" echo "Please, try to rebuild suphp manually" echo "If you use CPanel, you should run:" echo "/scripts/upcp --force" echo "/scripts/easyapache" echo "" cd $currentpath exit 1 fi cd $easyApacheDir/src done else echo "Cannot find suphp-0.7.1-cagefs.patch. Contact support at http://www.cloudlinux.com/support/" >>$log cd $currentpath exit 1 fi if [ $suphp_source_found -eq 0 ]; then echo "Error: suphp source is NOT found" echo "Please, try to rebuild suphp manually" echo "If you use CPanel, you should run:" echo "/scripts/upcp --force" echo "/scripts/easyapache" echo "" exit 1 fi cd $currentpath writeToLog "[CageFS] suphp was patched successfully" "$common_path_of_cpanel"