Skip to content

Commit

Permalink
bug fix: in backups v2
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Feb 1, 2024
1 parent a6f8a85 commit f854aaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backup/backupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ def CreateV2BackupStatus(self, userID=None, data=None):

statusFile = f'/home/cyberpanel/{domain}_rustic_backup_log'

if ACLManager.CheckStatusFilleLoc(statusFile):
if ACLManager.CheckStatusFilleLoc(statusFile, domain):
pass
else:
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "100",
Expand Down
8 changes: 7 additions & 1 deletion plogical/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,19 @@ def CheckDomainBlackList(domain):
return 1

@staticmethod
def CheckStatusFilleLoc(statusFile):
def CheckStatusFilleLoc(statusFile, domain=None):
TemFilePath = statusFile.split('panel/')[1]

try:
value = int(TemFilePath)
print(value)
except:
if domain != None:
value = statusFile.split('cyberpanel/')[1]
#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[
Expand Down

0 comments on commit f854aaf

Please sign in to comment.