mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 16:56:09 +01:00
Simplify install
This commit is contained in:
@@ -1209,14 +1209,22 @@ class InstallCyberPanel:
|
|||||||
|
|
||||||
def Main(cwd, mysql, distro):
|
def Main(cwd, mysql, distro):
|
||||||
|
|
||||||
InstallCyberPanel.mysqlPassword = randomPassword.generate_pass()
|
|
||||||
InstallCyberPanel.mysql_Root_password = randomPassword.generate_pass()
|
InstallCyberPanel.mysql_Root_password = randomPassword.generate_pass()
|
||||||
|
|
||||||
|
file_name = '/etc/cyberpanel/mysqlPassword'
|
||||||
password = open("/etc/cyberpanel/mysqlPassword", "w")
|
if access(file_name, os.F_OK):
|
||||||
password.writelines(InstallCyberPanel.mysql_Root_password)
|
password = open(file_name, 'r')
|
||||||
|
InstallCyberPanel.mysql_Root_password = password.readline()
|
||||||
|
else:
|
||||||
|
password = open(file_name, "w")
|
||||||
|
password.writelines(InstallCyberPanel.mysql_Root_password)
|
||||||
password.close()
|
password.close()
|
||||||
|
|
||||||
|
if distro == centos:
|
||||||
|
InstallCyberPanel.mysqlPassword = randomPassword.generate_pass()
|
||||||
|
else:
|
||||||
|
InstallCyberPanel.mysqlPassword = InstallCyberPanel.mysql_Root_password
|
||||||
|
|
||||||
installer = InstallCyberPanel("/usr/local/lsws/", cwd, distro)
|
installer = InstallCyberPanel("/usr/local/lsws/", cwd, distro)
|
||||||
|
|
||||||
installer.installLiteSpeed()
|
installer.installLiteSpeed()
|
||||||
@@ -1227,8 +1235,10 @@ def Main(cwd, mysql, distro):
|
|||||||
|
|
||||||
installer.setup_mariadb_repo()
|
installer.setup_mariadb_repo()
|
||||||
installer.installMySQL(mysql)
|
installer.installMySQL(mysql)
|
||||||
installer.changeMYSQLRootPassword()
|
if distro == centos:
|
||||||
installer.changeMYSQLRootPasswordCyberPanel(mysql)
|
installer.changeMYSQLRootPassword()
|
||||||
|
if distro == centos and mysql == 'Two':
|
||||||
|
installer.changeMYSQLRootPasswordCyberPanel(mysql)
|
||||||
installer.startMariaDB()
|
installer.startMariaDB()
|
||||||
|
|
||||||
mysqlUtilities.createDatabaseCyberPanel("cyberpanel", "cyberpanel", InstallCyberPanel.mysqlPassword, mysql)
|
mysqlUtilities.createDatabaseCyberPanel("cyberpanel", "cyberpanel", InstallCyberPanel.mysqlPassword, mysql)
|
||||||
|
|||||||
Reference in New Issue
Block a user