PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/thread-self/root/proc/self/root/proc/self/root/opt/maint/bin/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/thread-self/root/proc/self/root/proc/self/root/opt/maint/bin/cachecpanellogcount.sh

#!/bin/bash

#clean up lastrun files that shouldn't exist
for user in $(/usr/bin/find /var/cpanel/lastrun/ -type f -mmin +2160 | cut -d/ -f5 | sort -u); do
    if ! id "$user" &>/dev/null ; then  # if system user does not exist
        rm -f "/var/cpanel/users/$user"
        if [ ! -f "/var/cpanel/users/$user" ]; then
            rm -rf "/var/cpanel/lastrun/$user"
        fi
    fi
done

/usr/bin/find /var/cpanel/lastrun/ -type f -mmin +2160 | wc -l > /home/nagios/oldlogcount
chown nagios.nagios /home/nagios/oldlogcount