Bug fix to Websites and NameServer creation!

This commit is contained in:
usmannasir
2018-02-10 12:10:38 +05:00
parent 061af1eae5
commit a010f7982e
5 changed files with 17 additions and 15 deletions

View File

@@ -143,7 +143,7 @@ def NSCreation(request):
record = Records(domainOwner=newZone,
domain_id=newZone.id,
name=domainForNS,
name=ns1,
type="A",
content=firstNSIP,
ttl=3600,
@@ -168,7 +168,7 @@ def NSCreation(request):
record = Records(domainOwner=newZone,
domain_id=newZone.id,
name=domainForNS,
name=ns2,
type="A",
content=secondNSIP,
ttl=3600,

View File

@@ -2,6 +2,6 @@ from django.conf.urls import url
import views
urlpatterns = [
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.loadFileManagerHome, name='loadFileManagerHome'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.loadFileManagerHome, name='loadFileManagerHome'),
]

View File

@@ -33,7 +33,7 @@ class preFlightsChecks:
command = "sestatus"
output = subprocess.check_output(shlex.split(command))
if output.find("disabled") > -1:
if output.find("disabled") > -1 or output.find("permissive") > -1:
logging.InstallLog.writeToFile("SELinux Check OK. [checkIfSeLinuxDisabled]")
preFlightsChecks.stdOut("SELinux Check OK.")
return 1
@@ -45,6 +45,9 @@ class preFlightsChecks:
except BaseException,msg:
logging.InstallLog.writeToFile(str(msg) + "[checkIfSeLinuxDisabled]")
logging.InstallLog.writeToFile("SELinux Check OK. [checkIfSeLinuxDisabled]")
preFlightsChecks.stdOut("SELinux Check OK.")
return 1
def checkPythonVersion(self):
if sys.version_info[0] == 2 and sys.version_info[1] == 7:
@@ -575,8 +578,8 @@ class preFlightsChecks:
count = 0
while (1):
#command = "wget http://cyberpanel.net/CyberPanel.1.6.0.tar.gz"
command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
command = "wget http://cyberpanel.net/CyberPanel.1.6.0.tar.gz"
#command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
res = subprocess.call(shlex.split(command))
if res == 1:
@@ -595,8 +598,8 @@ class preFlightsChecks:
count = 0
while(1):
#command = "tar zxf CyberPanel.1.6.0.tar.gz"
command = "tar zxf CyberPanelTemp.tar.gz"
command = "tar zxf CyberPanel.1.6.0.tar.gz"
#command = "tar zxf CyberPanelTemp.tar.gz"
res = subprocess.call(shlex.split(command))
@@ -2290,7 +2293,7 @@ class preFlightsChecks:
command = "pip install certbot"
cmd = shlex.split(command)
subprocess.call(cmd)
res = subprocess.call(cmd)
if res == 1:
count = count + 1
@@ -2335,6 +2338,7 @@ class preFlightsChecks:
count = 0
while (1):
cmd = []
cmd.append("yum")
cmd.append("-y")
cmd.append("install")

View File

@@ -698,10 +698,8 @@ class InstallCyberPanel:
count = count + 1
InstallCyberPanel.stdOut("Trying to start PureFTPD instance, trying again, try number: " + str(count))
if count == 3:
logging.InstallLog.writeToFile(
"Failed to start PureFTPD instance, exiting installer! [startPureFTPD]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
sys.exit()
logging.InstallLog.writeToFile("Failed to start PureFTPD instance, you can do this manually later using systemctl start pure-ftpd [startPureFTPD]")
break
else:
logging.InstallLog.writeToFile("PureFTPD instance successfully started!")
InstallCyberPanel.stdOut("PureFTPD instance successfully started!")
@@ -982,7 +980,7 @@ class InstallCyberPanel:
count = 0
while(1):
command = 'yum -y install pcre-devel openssl-devel expat-devel geoip-devel zlib-devel udns-devel'
command = 'yum -y install pcre-devel openssl-devel expat-devel geoip-devel zlib-devel udns-devel which curl'
cmd = shlex.split(command)
res = subprocess.call(cmd)

View File

@@ -25,7 +25,7 @@ urlpatterns = [
url(r'^saveWebsiteChanges', views.saveWebsiteChanges, name='saveWebsiteChanges'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.domain, name='domain'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.domain, name='domain'),
url(r'^getDataFromLogFile', views.getDataFromLogFile, name='getDataFromLogFile'),
url(r'^fetchErrorLogs', views.fetchErrorLogs, name='fetchErrorLogs'),