mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix: install and SpamAssassin
This commit is contained in:
@@ -79,7 +79,7 @@ class SSHServer(multi.Thread):
|
|||||||
else:
|
else:
|
||||||
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
|
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
|
||||||
else:
|
else:
|
||||||
time.sleep(0.01)
|
pass
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
|
|||||||
@@ -827,12 +827,18 @@ def installStatusSpamAssassin(request):
|
|||||||
|
|
||||||
if installStatus.find("[200]")>-1:
|
if installStatus.find("[200]")>-1:
|
||||||
|
|
||||||
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
execPath = "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin && /usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
|
||||||
execPath = execPath + " configureSpamAssassin"
|
execPath = execPath + " configureSpamAssassin"
|
||||||
output = ProcessUtilities.outputExecutioner(execPath)
|
output = ProcessUtilities.outputExecutioner(execPath)
|
||||||
|
|
||||||
if output.find("1,None") > -1:
|
if output.find("1,None") > -1:
|
||||||
pass
|
final_json = json.dumps({
|
||||||
|
'error_message': "None",
|
||||||
|
'requestStatus': installStatus,
|
||||||
|
'abort': 1,
|
||||||
|
'installed': 1,
|
||||||
|
})
|
||||||
|
return HttpResponse(final_json)
|
||||||
else:
|
else:
|
||||||
final_json = json.dumps({
|
final_json = json.dumps({
|
||||||
'error_message': "Failed to install SpamAssassin configurations.",
|
'error_message': "Failed to install SpamAssassin configurations.",
|
||||||
@@ -842,13 +848,6 @@ def installStatusSpamAssassin(request):
|
|||||||
})
|
})
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
final_json = json.dumps({
|
|
||||||
'error_message': "None",
|
|
||||||
'requestStatus': installStatus,
|
|
||||||
'abort':1,
|
|
||||||
'installed': 1,
|
|
||||||
})
|
|
||||||
return HttpResponse(final_json)
|
|
||||||
elif installStatus.find("[404]") > -1:
|
elif installStatus.find("[404]") > -1:
|
||||||
|
|
||||||
final_json = json.dumps({
|
final_json = json.dumps({
|
||||||
|
|||||||
@@ -2240,8 +2240,8 @@ def main():
|
|||||||
checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro)
|
checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro)
|
||||||
checks.mountTemp()
|
checks.mountTemp()
|
||||||
|
|
||||||
if distro == ubuntu:
|
# if distro == ubuntu:
|
||||||
os.chdir("/etc/cyberpanel")
|
# os.chdir("/etc/cyberpanel")
|
||||||
|
|
||||||
if args.port == None:
|
if args.port == None:
|
||||||
port = "8090"
|
port = "8090"
|
||||||
|
|||||||
Reference in New Issue
Block a user