Duplicate SSH User command createWebsite CLI version #450

Solve #450
This commit is contained in:
AmiOta
2020-11-22 18:41:05 -05:00
committed by GitHub
parent a12492a306
commit bb29933165

View File

@@ -43,6 +43,17 @@ class cyberPanel:
externalApp = "".join(re.findall("[a-zA-Z]+", domainName))[:5] + str(randint(1000, 9999)) externalApp = "".join(re.findall("[a-zA-Z]+", domainName))[:5] + str(randint(1000, 9999))
phpSelection = 'PHP ' + php phpSelection = 'PHP ' + php
try:
counter = 0
_externalApp=externalApp
while True:
tWeb = Websites.objects.get(externalApp=externalApp)
externalApp = '%s%s' % (_externalApp, str(counter))
counter = counter + 1
except BaseException as msg:
logger.writeforCLI(str(msg), "Error", stack()[0][3])
time.sleep(2)
result = virtualHostUtilities.createVirtualHost(domainName, email, phpSelection, externalApp, ssl, dkim, result = virtualHostUtilities.createVirtualHost(domainName, email, phpSelection, externalApp, ssl, dkim,
openBasedir, owner, package, 0) openBasedir, owner, package, 0)