| Server IP : 68.178.172.28 / Your IP : 216.73.216.32 Web Server : Apache System : Linux 28.172.178.68.host.secureserver.net 4.18.0-553.89.1.el8_10.x86_64 #1 SMP Mon Dec 8 03:53:08 EST 2025 x86_64 User : kiskarnal ( 1003) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/lve/modlscapi/hooks/ |
Upload File : |
#!/bin/bash
LOG="/usr/share/lve/modlscapi/logs/lsapi_patch.log"
RES=$(cat "/usr/local/cpanel/Cpanel/WebServer/Supported/apache.pm" | grep "lsapi")
if [ -z "$RES" ]; then
current_path=$(pwd)
common_path_of_cpanel="/usr/share/lve/modlscapi/tars/"
cd "$common_path_of_cpanel" || exit
if [ -e "apache_pm.patch" ]; then
cd /usr/local/cpanel/Cpanel/WebServer/Supported || exit
patch -N -i $common_path_of_cpanel/apache_pm.patch
if [ $? != 0 ]; then
echo "$(date +%Y-%m-%d_%H:%M) - Error applying patch..." >> "$LOG"
cd "$current_path" || exit
exit 1
else
echo "$(date +%Y-%m-%d_%H:%M) - Patch was applied correctly..." >> "$LOG"
cd "$current_path" || exit
exit 0
fi
else
echo "$(date +%Y-%m-%d_%H:%M) - Cannot find apache_pm.patch..." >> "$LOG"
cd "$current_path" || exit
exit 1
fi
else
echo "$(date +%Y-%m-%d_%H:%M) - Already patched..." >> "$LOG"
exit 0
fi