allow to enter remote mysql default db

This commit is contained in:
Usman Nasir
2020-07-05 16:15:08 +05:00
parent 84536ea2d3
commit 71644a3a83

View File

@@ -308,26 +308,27 @@ class InstallCyberPanel:
def startMariaDB(self): def startMariaDB(self):
############## Start mariadb ###################### if self.remotemysql == 'OFF':
if self.distro == cent8 or self.distro == ubuntu: ############## Start mariadb ######################
command = 'systemctl start mariadb' if self.distro == cent8 or self.distro == ubuntu:
else: command = 'systemctl start mariadb'
command = "systemctl start mysql" else:
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) command = "systemctl start mysql"
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
############## Enable mariadb at system startup ###################### ############## Enable mariadb at system startup ######################
if os.path.exists('/etc/systemd/system/mysqld.service'): if os.path.exists('/etc/systemd/system/mysqld.service'):
os.remove('/etc/systemd/system/mysqld.service') os.remove('/etc/systemd/system/mysqld.service')
if os.path.exists('/etc/systemd/system/mariadb.service'): if os.path.exists('/etc/systemd/system/mariadb.service'):
os.remove('/etc/systemd/system/mariadb.service') os.remove('/etc/systemd/system/mariadb.service')
if self.distro == ubuntu: if self.distro == ubuntu:
command = "systemctl enable mariadb" command = "systemctl enable mariadb"
else: else:
command = "systemctl enable mariadb" command = "systemctl enable mariadb"
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
def fixMariaDB(self): def fixMariaDB(self):
self.stdOut("Setup MariaDB so it can support Cyberpanel's needs") self.stdOut("Setup MariaDB so it can support Cyberpanel's needs")