Skip to content

Commit 9914692

Browse files
committed
cPanel Importer: Bug fix: Domain not allowed on rainloop
1 parent 38779d5 commit 9914692

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plogical/mailUtilities.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ def createEmailAccount(domain, userName, password):
112112

113113
execPath = "/usr/local/CyberCP/bin/python2 /usr/local/CyberCP/plogical/mailUtilities.py"
114114
execPath = execPath + " AfterEffects --domain " + domain
115-
ProcessUtilities.executioner(execPath, 'lscpd')
115+
116+
if os.getlogin() == 'root':
117+
## This is the case when cPanel Importer is running and token is not present in enviroment.
118+
ProcessUtilities.normalExecutioner(execPath)
119+
else:
120+
ProcessUtilities.executioner(execPath, 'lscpd')
116121

117122
## After effects ends
118123

0 commit comments

Comments
 (0)