MOON
Server: Apache
System: Linux kvm.asjudinet.com 5.14.0-611.54.6.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 04:23:18 EDT 2026 x86_64
User: asjudine (1001)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/usr/sbin/kill_php_script
#!/usr/bin/bash

KEY=`grep ^disable_kill_orphaned_cron /etc/sysconfig//cloudlinux  | sed 's/disable_kill_orphaned_cron[ ]*=[ ]*//'`

if [ -z "$KEY" -o "$KEY" = 'n' -o "$KEY" = 'N' ]; then
  # LU-539: use "command:4096" in order to get full path (without cutting). 4096 == MAX_PATH (usual maximum path length allowed by linux kernel)
  /bin/ps -Ao"pid,etime,command:4096,ppid" | grep /php | grep -v -E 'jetbackup|sw-engine|mysqld_safe|lsphp|php-fpm|/home/interworx/bin/php' | /bin/grep ' 1$' | awk '{if ($2 >= "10:00" ) print $1}' | /usr/bin/xargs --no-run-if-empty kill -9
fi