mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 15:26:13 +01:00
convert from chttr to quotas
This commit is contained in:
@@ -1041,28 +1041,28 @@ Automatic backup failed for %s on %s.
|
|||||||
config['DiskUsage'], config['DiskUsagePercentage'] = virtualHostUtilities.getDiskUsage(
|
config['DiskUsage'], config['DiskUsagePercentage'] = virtualHostUtilities.getDiskUsage(
|
||||||
"/home/" + website.domain, website.package.diskSpace)
|
"/home/" + website.domain, website.package.diskSpace)
|
||||||
|
|
||||||
if website.package.enforceDiskLimits:
|
# if website.package.enforceDiskLimits:
|
||||||
spaceString = f'{website.package.diskSpace}M {website.package.diskSpace}M'
|
# spaceString = f'{website.package.diskSpace}M {website.package.diskSpace}M'
|
||||||
command = f'setquota -u {website.externalApp} {spaceString} 0 0 /'
|
# command = f'setquota -u {website.externalApp} {spaceString} 0 0 /'
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
if config['DiskUsagePercentage'] >= 100:
|
# if config['DiskUsagePercentage'] >= 100:
|
||||||
command = 'chattr -R +i /home/%s/' % (website.domain)
|
# command = 'chattr -R +i /home/%s/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
|
#
|
||||||
command = 'chattr -R -i /home/%s/logs/' % (website.domain)
|
# command = 'chattr -R -i /home/%s/logs/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
|
#
|
||||||
command = 'chattr -R -i /home/%s/.trash/' % (website.domain)
|
# command = 'chattr -R -i /home/%s/.trash/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
|
#
|
||||||
command = 'chattr -R -i /home/%s/backup/' % (website.domain)
|
# command = 'chattr -R -i /home/%s/backup/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
|
#
|
||||||
command = 'chattr -R -i /home/%s/incbackup/' % (website.domain)
|
# command = 'chattr -R -i /home/%s/incbackup/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
else:
|
# else:
|
||||||
command = 'chattr -R -i /home/%s/' % (website.domain)
|
# command = 'chattr -R -i /home/%s/' % (website.domain)
|
||||||
ProcessUtilities.executioner(command)
|
# ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
## Calculate bw usage
|
## Calculate bw usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user