mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-04 21:59:05 +01:00
bug fix clone/staging https://app.clickup.com/t/86enk37mh
This commit is contained in:
@@ -882,7 +882,10 @@ class ACLManager:
|
||||
|
||||
@staticmethod
|
||||
def CheckStatusFilleLoc(statusFile, domain=None):
|
||||
TemFilePath = statusFile.split('panel/')[1]
|
||||
if statusFile.find('panel/') > -1:
|
||||
TemFilePath = statusFile.split('panel/')[1]
|
||||
else:
|
||||
TemFilePath = statusFile.split('tmp/')[1]
|
||||
|
||||
try:
|
||||
value = int(TemFilePath)
|
||||
@@ -893,11 +896,9 @@ class ACLManager:
|
||||
#logging.writeToFile(f'value of log file {value}')
|
||||
if value == f'{domain}_rustic_backup_log':
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
if (statusFile[:18] != "/home/cyberpanel/." or statusFile[:16] == "/home/cyberpanel" or statusFile[
|
||||
:4] == '/tmp' or statusFile[
|
||||
if (statusFile[:18] != "/home/cyberpanel/." or statusFile[:16] == "/home/cyberpanel" or statusFile[:4] == '/tmp' or statusFile[
|
||||
:18] == '/usr/local/CyberCP') \
|
||||
and statusFile != '/usr/local/CyberCP/CyberCP/settings.py' and statusFile.find(
|
||||
'..') == -1 and statusFile != '/home/cyberpanel/.my.cnf' and statusFile != '/home/cyberpanel/.bashrc' and statusFile != '/home/cyberpanel/.bash_logout' and statusFile != '/home/cyberpanel/.profile':
|
||||
|
||||
@@ -2079,14 +2079,19 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
|
||||
#
|
||||
# IncScheduler.CalculateAndUpdateDiskUsage()
|
||||
|
||||
website = Websites.objects.get(domain=backupDomain)
|
||||
DiskUsageOfSite = json.loads(website.config)['DiskUsage']
|
||||
used_disk, free_disk, percent_used = SystemInformation.GetRemainingDiskUsageInMBs()
|
||||
try:
|
||||
|
||||
if float(free_disk) <= float(DiskUsageOfSite):
|
||||
command = f"echo 'Disk space exceeded the website size. [2065][5009]' > %s"
|
||||
ProcessUtilities.executioner(command, website.externalApp)
|
||||
return 0
|
||||
website = Websites.objects.get(domain=backupDomain)
|
||||
DiskUsageOfSite = json.loads(website.config)['DiskUsage']
|
||||
used_disk, free_disk, percent_used = SystemInformation.GetRemainingDiskUsageInMBs()
|
||||
|
||||
|
||||
if float(free_disk) <= float(DiskUsageOfSite):
|
||||
command = f"echo 'Disk space exceeded the website size. [2065][5009]' > %s"
|
||||
ProcessUtilities.executioner(command, website.externalApp)
|
||||
return 0
|
||||
except:
|
||||
pass
|
||||
|
||||
###
|
||||
|
||||
|
||||
Reference in New Issue
Block a user