mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 07:46:10 +01:00
Bug fix to local backup generation.
This commit is contained in:
@@ -703,8 +703,8 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
while (1):
|
while (1):
|
||||||
command = "wget http://cyberpanel.net/CyberPanel.1.6.0.tar.gz"
|
#command = "wget http://cyberpanel.net/CyberPanel.1.6.0.tar.gz"
|
||||||
#command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
|
command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
|
||||||
res = subprocess.call(shlex.split(command))
|
res = subprocess.call(shlex.split(command))
|
||||||
|
|
||||||
if res == 1:
|
if res == 1:
|
||||||
@@ -723,8 +723,8 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
while(1):
|
while(1):
|
||||||
command = "tar zxf CyberPanel.1.6.0.tar.gz"
|
#command = "tar zxf CyberPanel.1.6.0.tar.gz"
|
||||||
#command = "tar zxf CyberPanelTemp.tar.gz"
|
command = "tar zxf CyberPanelTemp.tar.gz"
|
||||||
|
|
||||||
res = subprocess.call(shlex.split(command))
|
res = subprocess.call(shlex.split(command))
|
||||||
|
|
||||||
@@ -2480,6 +2480,16 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
def modSecPreReqs(self):
|
||||||
|
try:
|
||||||
|
|
||||||
|
pathToRemoveGarbageFile = os.path.join(self.server_root_path,"modules/mod_security.so")
|
||||||
|
os.remove(pathToRemoveGarbageFile)
|
||||||
|
|
||||||
|
except OSError, msg:
|
||||||
|
logging.InstallLog.writeToFile(str(msg) + " [modSecPreReqs]")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
@@ -2552,6 +2562,7 @@ def main():
|
|||||||
checks.test_Requests()
|
checks.test_Requests()
|
||||||
checks.download_install_CyberPanel(installCyberPanel.InstallCyberPanel.mysqlPassword)
|
checks.download_install_CyberPanel(installCyberPanel.InstallCyberPanel.mysqlPassword)
|
||||||
checks.setup_cron()
|
checks.setup_cron()
|
||||||
|
checks.modSecPreReqs()
|
||||||
checks.installation_successfull()
|
checks.installation_successfull()
|
||||||
|
|
||||||
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
|
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
|
||||||
|
|||||||
@@ -33,13 +33,18 @@ class backupScheduleLocal:
|
|||||||
writeToFile.writelines("[" + time.strftime(
|
writeToFile.writelines("[" + time.strftime(
|
||||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for backup to complete.. " + "\n")
|
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for backup to complete.. " + "\n")
|
||||||
|
|
||||||
if data['status'] == 0:
|
if data['backupStatus'] == 0:
|
||||||
|
writeToFile.writelines("[" + time.strftime(
|
||||||
|
"%I-%M-%S-%a-%b-%Y") + "]" + "An error occurred, Error message: " + data['error_message'] + "\n")
|
||||||
|
break
|
||||||
|
elif data['abort'] == 1:
|
||||||
writeToFile.writelines("[" + time.strftime(
|
writeToFile.writelines("[" + time.strftime(
|
||||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Backup Completed for: " + virtualHost + "\n")
|
"%I-%M-%S-%a-%b-%Y") + "]" + " Backup Completed for: " + virtualHost + "\n")
|
||||||
|
|
||||||
writeToFile.writelines("[" + time.strftime(
|
writeToFile.writelines("[" + time.strftime(
|
||||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #############################################" + "\n")
|
"%I-%M-%S-%a-%b-%Y") + "]" + " #############################################" + "\n")
|
||||||
break
|
break
|
||||||
|
|
||||||
except BaseException,msg:
|
except BaseException,msg:
|
||||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")
|
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user