Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/opt/maint/bin
File: cachecpanellogcount.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
#clean up lastrun files that shouldn't exist
[2] Fix | Delete
for user in $(/usr/bin/find /var/cpanel/lastrun/ -type f -mmin +2160 | cut -d/ -f5 | sort -u); do
[3] Fix | Delete
if ! id "$user" &>/dev/null ; then # if system user does not exist
[4] Fix | Delete
rm -f "/var/cpanel/users/$user"
[5] Fix | Delete
if [ ! -f "/var/cpanel/users/$user" ]; then
[6] Fix | Delete
rm -rf "/var/cpanel/lastrun/$user"
[7] Fix | Delete
fi
[8] Fix | Delete
fi
[9] Fix | Delete
done
[10] Fix | Delete
[11] Fix | Delete
/usr/bin/find /var/cpanel/lastrun/ -type f -mmin +2160 | wc -l > /home/nagios/oldlogcount
[12] Fix | Delete
chown nagios.nagios /home/nagios/oldlogcount
[13] Fix | Delete
[14] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function