Skip to content
Permalink
Browse files

bug fix: email limits, cPanel Importer: custom child domain path

  • Loading branch information...
usmannasir committed Sep 2, 2019
1 parent 2405746 commit 74c1c668f1b79caec7ef69d496fd087c3e7ca6e4
Showing with 37 additions and 3 deletions.
  1. +18 −1 emailPremium/views.py
  2. +6 −2 plogical/cPanelImporter.py
  3. +13 −0 plogical/upgrade.py
@@ -225,7 +225,24 @@ def getFurtherDomains(request):
else:
json_data = json_data +',' + json.dumps(dic)
except BaseException, msg:
pass
try:
domain = Domains.objects.get(domainOwner=items)
except:
domain = Domains(domainOwner=items, domain=items.domain)
domain.save()

domainLimits = DomainLimits(domain=domain)
domainLimits.save()

dic = {'domain': items.domain, 'emails': domain.eusers_set.all().count(),
'monthlyLimit': domainLimits.monthlyLimit, 'monthlyUsed': domainLimits.monthlyUsed,
'status': domainLimits.limitStatus}

if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else:
json_data = json_data + ',' + json.dumps(dic)

json_data = json_data + ']'
final_dic = {'listWebSiteStatus': 1, 'error_message': "None", "data": json_data}
@@ -74,7 +74,6 @@ def PHPDecider(self):
if self.PHPVersion == '':
self.PHPVersion = 'PHP 7.1'


def SetupSSL(self, path, domain):

data = open(path, 'r').readlines()
@@ -445,7 +444,12 @@ def CreateChildDomains(self):
else:
movePath = '%s/homedir/%s' % (
CompletPathToExtractedArchive, ChildDocRoot.split('/')[-1].replace(self.documentRoot, '', 1).replace('/', ''))
shutil.move(movePath, path)
if os.path.exists(movePath):
shutil.move(movePath, path)
else:
movePath = '%s/homedir/%s' % (
CompletPathToExtractedArchive, items.domain)
shutil.move(movePath, path)

command = 'chown -R %s:%s %s' % (externalApp, externalApp, path)
ProcessUtilities.normalExecutioner(command)
@@ -360,6 +360,19 @@ def downoad_and_install_raindloop():

writeToFile.close()

command = "mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/"
Upgrade.executioner(command, 'mkdir rainloop configs', 0)

labsPath = '/usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini'

labsData = """[labs]
imap_folder_list_limit = 0
"""

writeToFile = open(labsPath, 'w')
writeToFile.write(labsData)
writeToFile.close()

os.chdir(cwd)

except BaseException, msg:

0 comments on commit 74c1c66

Please sign in to comment.
You can’t perform that action at this time.