Bug fix to domain creation.
This commit is contained in:
parent
4a4873db7e
commit
bf496020b2
|
|
@ -43,7 +43,6 @@ class preFlightsChecks:
|
|||
logging.InstallLog.writeToFile("SELinux is enabled, please disable SELinux and restart the installation!")
|
||||
preFlightsChecks.stdOut("Installation failed, consult: /var/log/installLogs.txt")
|
||||
sys.exit()
|
||||
return 0
|
||||
|
||||
except BaseException,msg:
|
||||
logging.InstallLog.writeToFile(str(msg) + "[checkIfSeLinuxDisabled]")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" ?>
|
||||
<installCommands>
|
||||
<installSudo>
|
||||
<centos7>yum install sudo -y</centos7>
|
||||
<ubuntu16.04>apt-get install sudo -y</ubuntu16.04>
|
||||
</installSudo>
|
||||
<addUser>
|
||||
<centos7>adduser cyberpanel</centos7>
|
||||
<ubuntu16.04>adduser --disabled-password --gecos "" cyberpanel</ubuntu16.04>
|
||||
</addUser>
|
||||
<giveSudo>
|
||||
<centos7>usermod -aG wheel cyberpanel</centos7>
|
||||
<ubuntu16.04>usermod -aG sudo cyberpanel</ubuntu16.04>
|
||||
</giveSudo>
|
||||
</installCommands>
|
||||
|
|
@ -251,10 +251,11 @@
|
|||
<div style="border-radius: 25px;border-color:#3498db" class="content-box">
|
||||
|
||||
<h3 class="content-box-header bg-blue">
|
||||
{% trans "Domains" %} <img ng-hide="domainLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
{% trans "Domains" %} <img ng-hide="domainLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="content-box-wrapper">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4" style="margin-bottom: 2%;">
|
||||
|
|
@ -294,11 +295,10 @@
|
|||
|
||||
|
||||
<!---------- HTML For creating domains --------------->
|
||||
|
||||
<div class="col-md-12">
|
||||
<form id="domainCreationForm" name="websiteCreationForm" action="/" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
|
|
@ -383,7 +383,8 @@
|
|||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!---------- HTML For creating domains --------------->
|
||||
|
||||
|
|
@ -478,7 +479,7 @@
|
|||
</div>
|
||||
|
||||
<!---------- HTML For Listing domains --------------->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -412,9 +412,11 @@ def submitDomainCreation(request):
|
|||
####### Limitations check
|
||||
|
||||
master = Websites.objects.get(domain=masterDomain)
|
||||
domainsInPackage = master.package.allowedDomains
|
||||
|
||||
|
||||
if master.package.allowedDomains > master.childdomains_set.all().count():
|
||||
if domainsInPackage == 0:
|
||||
pass
|
||||
elif domainsInPackage > master.childdomains_set.all().count():
|
||||
pass
|
||||
else:
|
||||
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue