Skip to content

Commit

Permalink
bug fix: install and SpamAssassin
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Dec 9, 2019
1 parent 9c6dffa commit b3da16d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion WebTerminal/CPWebSocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def recvData(self):
else:
self.websocket.sendMessage(self.shell.recv(9000).decode("utf-8"))
else:
time.sleep(0.01)
pass
else:
return 0
except BaseException, msg:
Expand Down
17 changes: 8 additions & 9 deletions emailPremium/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,12 +827,18 @@ def installStatusSpamAssassin(request):

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"
output = ProcessUtilities.outputExecutioner(execPath)

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:
final_json = json.dumps({
'error_message': "Failed to install SpamAssassin configurations.",
Expand All @@ -842,13 +848,6 @@ def installStatusSpamAssassin(request):
})
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:

final_json = json.dumps({
Expand Down
4 changes: 2 additions & 2 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,8 +2240,8 @@ def main():
checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro)
checks.mountTemp()

if distro == ubuntu:
os.chdir("/etc/cyberpanel")
# if distro == ubuntu:
# os.chdir("/etc/cyberpanel")

if args.port == None:
port = "8090"
Expand Down

0 comments on commit b3da16d

Please sign in to comment.