mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-03 06:09:41 +01:00
Bug fix to domain creation.
This commit is contained in:
@@ -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]")
|
||||
|
||||
15
install/install.xml
Normal file
15
install/install.xml
Normal file
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user