Merge branch 'stable' into u_dev

This commit is contained in:
Usman Nasir
2019-11-15 22:17:12 +05:00
3 changed files with 6 additions and 6 deletions

View File

@@ -132,6 +132,7 @@ class preFlightsChecks:
if log:
logging.InstallLog.writeToFile(message)
if do_exit:
logging.InstallLog.writeToFile(message)
sys.exit(code)
def mountTemp(self):
@@ -468,7 +469,7 @@ class preFlightsChecks:
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
else:
command = 'yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'yum install git -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
@@ -2335,7 +2336,7 @@ def main():
checks.setUpFirstAccount()
# checks.p3(distro)
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
checks.installation_successfull()
#checks.installation_successfull()
if __name__ == "__main__":

View File

@@ -3,7 +3,6 @@ import subprocess
import os
from mysqlUtilities import mysqlUtilities
import installLog as logging
import shlex
import randomPassword
import errno
import MySQLdb as mariadb
@@ -279,7 +278,7 @@ class InstallCyberPanel:
command = 'mysql -u root -e "' + passwordCMD + '"'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
install.preFlightsChecks.call(command, self.distro, command, command, 0, 0, os.EX_OSERR)
def startMariaDB(self):

View File

@@ -1398,6 +1398,8 @@ class Upgrade:
writeToFile = open("/usr/local/CyberCP/CyberCP/settings.py", 'w')
for items in data:
if items.find('csf') > -1:
continue
if items.find("CommonMiddleware") > -1:
if csrfCheck == 1:
writeToFile.writelines(" 'django.middleware.csrf.CsrfViewMiddleware',\n")
@@ -1444,8 +1446,6 @@ CSRF_COOKIE_SECURE = True
MEDIA_URL = 1
for items in data:
if items.find('csf') > -1:
continue
if items.find('MEDIA_URL') > -1:
MEDIA_URL = 0