X7ROOT File Manager
Current Path:
/usr/share/lve/modlscapi/hooks
usr
/
share
/
lve
/
modlscapi
/
hooks
/
📁
..
📄
buildlsphp.hook
(839 B)
📄
clearconf.hook
(923 B)
📄
cpanel_check_handlers_hook.sh
(1.3 KB)
📄
cpanel_post_upcp_check_handlers_hook.py
(1.35 KB)
📄
cpanel_post_upcp_lsapi_hook.py
(1.33 KB)
📄
cpanel_pre_upcp_check_handlers_hook.py
(1.34 KB)
📄
cpanelpostupcp.hook
(2.03 KB)
📄
lsapi.hook
(1.05 KB)
📄
lsapi_patch_cpanel_hook.sh
(1.01 KB)
Editing: lsapi_patch_cpanel_hook.sh
#!/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
Upload File
Create Folder