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

Dir : /proc/self/root/opt/sharedrads/guds_modules/deleters/
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/self/root/opt/sharedrads/guds_modules/deleters/backup.py

"""Removes full cPanel backups residing in the homedir"""
from guds_modules.base import ModuleBase

REGEX = (
    r'.*\/(cpmove-[a-z]+([0-9]{1,3})?(.tar(.gz|$)|$)|'
    r'backup-[0-9]{1,2}[.][0-9]{1,2}[.][0-9]{4}_'
    r'[0-9]{1,2}-[0-9]{1,2}-[0-9]{1,2}_[a-z]+([0-9]{1,3})?.tar(.gz|$))'
)


class Module(ModuleBase):
    """Removes full cPanel backups residing in the homedir"""

    def run_module(self, homedir):
        if backup_list := self.find(
            homedir, maxdepth=1, mtime="+7", regex=REGEX
        ):
            self.delete_items(backup_list)
        return {}  # no email