mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 16:26:12 +01:00
backupdoneini
This commit is contained in:
@@ -2147,10 +2147,11 @@ $parameters = array(
|
||||
from managePHP.phpManager import PHPManager
|
||||
import json
|
||||
tempStatusPath = self.extraArgs['tempStatusPath']
|
||||
self.tempStatusPath = tempStatusPath
|
||||
|
||||
statusFile = open(tempStatusPath, 'w')
|
||||
statusFile.writelines('Creating BackUp...,10')
|
||||
statusFile.close()
|
||||
|
||||
wpsite = WPSites.objects.get(pk=self.extraArgs['WPid'])
|
||||
|
||||
website =Websites.objects.get(pk=wpsite.owner_id)
|
||||
@@ -2282,10 +2283,10 @@ $parameters = array(
|
||||
if os.path.exists(ProcessUtilities.debugPath):
|
||||
logging.writeToFile(result)
|
||||
|
||||
|
||||
command = f'rm -rf {tempPath}'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
|
||||
statusFile = open(tempStatusPath, 'w')
|
||||
statusFile.writelines("Successfully Created. [200]")
|
||||
statusFile.close()
|
||||
@@ -2293,6 +2294,8 @@ $parameters = array(
|
||||
|
||||
|
||||
except BaseException as msg:
|
||||
command = f'rm -rf {self.tempPath}'
|
||||
ProcessUtilities.executioner(command)
|
||||
logging.writeToFile("Error WPCreateBackup ....... %s" % str(msg))
|
||||
statusFile = open(self.tempStatusPath, 'w')
|
||||
statusFile.writelines(str(msg) + " [404]")
|
||||
|
||||
Reference in New Issue
Block a user