From a300ef83ce5a7119932a192589afb48993f7b40d Mon Sep 17 00:00:00 2001 From: Greenweb Bangladesh <51988436+bdgreenweb@users.noreply.github.com> Date: Wed, 22 Dec 2021 04:57:18 +0600 Subject: [PATCH] Update IncScheduler.py This will exclude log directory & backup directories from being immutable after exceeding disk quota limit. --- plogical/IncScheduler.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plogical/IncScheduler.py b/plogical/IncScheduler.py index 1bd4c365b..174a88ad4 100644 --- a/plogical/IncScheduler.py +++ b/plogical/IncScheduler.py @@ -764,8 +764,21 @@ Automatic backup failed for %s on %s. if website.package.enforceDiskLimits: if config['DiskUsagePercentage'] >= 100: - command = 'chattr -R +i /home/%s/public_html/' % (website.domain) + command = 'chattr -R +i /home/%s/' % (website.domain) ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/logs/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/.trash/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/backup/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/incbackup/' % (website.domain) + ProcessUtilities.executioner(command) + else: command = 'chattr -R -i /home/%s/public_html/' % (website.domain) ProcessUtilities.executioner(command)