| Server IP : 172.67.178.83 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/python-cllib/scriptlets/ |
Upload File : |
#!/bin/bash
# RPM posttrans script, no arguments
# Note: Also called from Debian alt-python27-cllib.postinst scriptlet
# Arguments:
# $1 - share_path - /usr/share/python-cllib
# $2 - python python_sitelib path - /opt/cloudlinux/venv/lib/python3.11/site-packages
# $3 - hook marker file - /usr/share/cloudlinux/hooks/.inuse.tmp
# "python-cllib POST TRANS STARTED"
setcap "cap_sys_resource=ep" "$1"/cl.captain
if [ -f "/usr/local/directadmin/directadmin_cache.lock" ]; then
# clean cache directory created for
# internal purposes, not used anymore
rm -rf /var/cache/clcommon/directadmin
unused_command='directadmin_cache.py'
scripts_dir='/usr/local/directadmin/scripts/custom'
files="old_user_create_post.sh old_user_destroy_post.sh"
# remove hooks that were not removed in usual way
for file in $files
do
sed -i -e '/'"${unused_command}"'/d' ${scripts_dir}/$file || true;
done;
rm -f /usr/local/directadmin/directadmin_cache.lock
fi;
if [ -f "/usr/local/directadmin/directadmin" ]; then
# See PTCLLIB-117
echo 1 > /root/.suid_directadmin
/usr/local/directadmin/directadmin p
fi;
# install hooks for supported control panels
"$2"/clcommon/public_hooks/bundle/hooks.py install
# clean marker
rm -f "$3"
if [ -f "/usr/bin/cldetect" ]; then
/usr/bin/flock -n /var/run/cl_detect_for_users.cronlock /usr/bin/cldetect --detect-edition >| /opt/cloudlinux/cl_edition
/usr/bin/flock -n /var/run/cl_detect_ls_for_users.cronlock /usr/bin/cldetect --detect-litespeed; echo "$?" > /opt/cloudlinux/litespeed_status
fi;
# "python-cllib POST TRANS FINISHED"
exit 0