diff --git a/cli/cyberPanel.py b/cli/cyberPanel.py index afc260955..1ac06edd8 100755 --- a/cli/cyberPanel.py +++ b/cli/cyberPanel.py @@ -42,6 +42,17 @@ class cyberPanel: from random import randint externalApp = "".join(re.findall("[a-zA-Z]+", domainName))[:5] + str(randint(1000, 9999)) 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, openBasedir, owner, package, 0) @@ -1556,4 +1567,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()