HEX
Server: Apache
System: Linux ecres233.servconfig.com 4.18.0-553.94.1.lve.el8.x86_64 #1 SMP Thu Jan 22 12:37:22 UTC 2026 x86_64
User: gonnelllaw (9952)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: //opt/sharedrads/ctrl_alt_del
#!/bin/bash

#Wrapper to get the environment when shutdown is called

rightnow=$(date +%s)

filename=$(echo -n "/root/shutdown-$rightnow.log")

echo "Shutdown log $filename" > $filename
echo "Open files of parent $PPID:" >> $filename
lsof -p $PPID >> $filename
echo >> $filename
echo "Parent/Child tree:" >> $filename
ps faux >> $filename
echo >> $filename
echo "Environment variables:" >> $filename
env >> $filename
echo >> $filename
echo "Arguments:" >> $filename
echo "shutdown $@" >> $filename

/opt/sharedrads/strmailer -u root -f "$filename" -s "Shutdown event on $(/bin/hostname) at $rightnow" -e sadmin@imhadmin.net

echo "This shutdown attempt has been logged.  If you really need to shutdown the server, use the shutdown command."