Skip to content

Commit b3da16d

Browse files
committed
bug fix: install and SpamAssassin
1 parent 9c6dffa commit b3da16d

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

WebTerminal/CPWebSocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def recvData(self):
7979
else:
8080
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
8181
else:
82-
time.sleep(0.01)
82+
pass
8383
else:
8484
return 0
8585
except BaseException, msg:

emailPremium/views.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,18 @@ def installStatusSpamAssassin(request):
827827

828828
if installStatus.find("[200]")>-1:
829829

830-
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/mailUtilities.py"
830+
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"
831831
execPath = execPath + " configureSpamAssassin"
832832
output = ProcessUtilities.outputExecutioner(execPath)
833833

834834
if output.find("1,None") > -1:
835-
pass
835+
final_json = json.dumps({
836+
'error_message': "None",
837+
'requestStatus': installStatus,
838+
'abort': 1,
839+
'installed': 1,
840+
})
841+
return HttpResponse(final_json)
836842
else:
837843
final_json = json.dumps({
838844
'error_message': "Failed to install SpamAssassin configurations.",
@@ -842,13 +848,6 @@ def installStatusSpamAssassin(request):
842848
})
843849
return HttpResponse(final_json)
844850

845-
final_json = json.dumps({
846-
'error_message': "None",
847-
'requestStatus': installStatus,
848-
'abort':1,
849-
'installed': 1,
850-
})
851-
return HttpResponse(final_json)
852851
elif installStatus.find("[404]") > -1:
853852

854853
final_json = json.dumps({

install/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,8 +2240,8 @@ def main():
22402240
checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro)
22412241
checks.mountTemp()
22422242

2243-
if distro == ubuntu:
2244-
os.chdir("/etc/cyberpanel")
2243+
# if distro == ubuntu:
2244+
# os.chdir("/etc/cyberpanel")
22452245

22462246
if args.port == None:
22472247
port = "8090"

0 commit comments

Comments
 (0)