From 991469296417d5e5e3e8aaf9b8d8eb1eb467c1b2 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 23 Aug 2019 17:29:24 +0500 Subject: [PATCH] cPanel Importer: Bug fix: Domain not allowed on rainloop --- plogical/mailUtilities.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index fb261ad12..801db1ad9 100755 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -112,7 +112,12 @@ class mailUtilities: execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py" execPath = execPath + " AfterEffects --domain " + domain - ProcessUtilities.executioner(execPath, 'lscpd') + + if os.getlogin() == 'root': + ## This is the case when cPanel Importer is running and token is not present in enviroment. + ProcessUtilities.normalExecutioner(execPath) + else: + ProcessUtilities.executioner(execPath, 'lscpd') ## After effects ends