mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-09 16:16:48 +01:00
bug fix: createDomain
This commit is contained in:
@@ -378,6 +378,7 @@ class vhost:
|
||||
delWebsite = Websites.objects.get(domain=virtualHostName)
|
||||
externalApp = delWebsite.externalApp
|
||||
|
||||
|
||||
##
|
||||
|
||||
databases = Databases.objects.filter(website=delWebsite)
|
||||
@@ -891,18 +892,19 @@ class vhost:
|
||||
completePathToConfigFile = confPath + "/vhost.conf"
|
||||
|
||||
try:
|
||||
os.makedirs(path)
|
||||
|
||||
command = 'sudo -u %s mkdir %s' % (virtualHostUser, path)
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||
groupName = 'nobody'
|
||||
else:
|
||||
groupName = 'nogroup'
|
||||
|
||||
command = "chown " + virtualHostUser + ":%s " % (groupName) + path
|
||||
cmd = shlex.split(command)
|
||||
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
||||
command = 'sudo -u %s chown %s:%s %s' % (virtualHostUser, virtualHostUser, groupName, path)
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
command = "chmod 750 %s" % (path)
|
||||
command = "sudo -u %s chmod 750 %s" % (virtualHostUser, path)
|
||||
cmd = shlex.split(command)
|
||||
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
||||
|
||||
|
||||
@@ -1001,6 +1001,7 @@ class virtualHostUtilities:
|
||||
|
||||
postFixPath = '/home/cyberpanel/postfix'
|
||||
|
||||
|
||||
if os.path.exists(postFixPath):
|
||||
retValues = mailUtilities.setupDKIM(virtualHostName)
|
||||
if retValues[0] == 0:
|
||||
|
||||
Reference in New Issue
Block a user