mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-07-08 17:33:46 +02:00
bug fix: install process
This commit is contained in:
@@ -145,15 +145,9 @@ class ServerStatusUtil:
|
||||
if os.path.exists('/usr/local/lsws'):
|
||||
shutil.rmtree('/usr/local/lsws')
|
||||
|
||||
command = 'tar -zxvf /usr/local/olsBackup.tar.gz -C /usr/local/'
|
||||
command = 'mv /usr/local/lsws.bak /usr/local/lsws'
|
||||
ServerStatusUtil.executioner(command, FNULL)
|
||||
|
||||
command = 'mv /usr/local/usr/local/lsws /usr/local'
|
||||
ServerStatusUtil.executioner(command, FNULL)
|
||||
|
||||
if os.path.exists('/usr/local/usr'):
|
||||
shutil.rmtree('/usr/local/usr')
|
||||
|
||||
@staticmethod
|
||||
def createWebsite(website):
|
||||
try:
|
||||
@@ -285,9 +279,16 @@ class ServerStatusUtil:
|
||||
ProcessUtilities.killLiteSpeed()
|
||||
|
||||
if os.path.exists('/usr/local/lsws'):
|
||||
command = 'tar -zcvf /usr/local/olsBackup.tar.gz /usr/local/lsws'
|
||||
command = 'mkdir /usr/local/lsws.bak'
|
||||
if ServerStatusUtil.executioner(command, FNULL) == 0:
|
||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, "Failed to create backup of current LSWS. [404]", 1)
|
||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, "Failed to create backup of current LSWS. [mkdir] [404]", 1)
|
||||
ServerStatusUtil.recover()
|
||||
return 0
|
||||
|
||||
command = 'cp -R /usr/local/lsws/* /usr/local/lsws.bak/'
|
||||
if ServerStatusUtil.executioner(command, FNULL) == 0:
|
||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||
"Failed to create backup of current LSWS. [cp][404]", 1)
|
||||
ServerStatusUtil.recover()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "License Key" %}</label>
|
||||
<label class="col-sm-3 control-label">{% trans "LiteSpeed Serial No. (License Key)" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" ng-model="licenseKey"
|
||||
required>
|
||||
|
||||
Reference in New Issue
Block a user