mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +01:00
allow to enter remote mysql default db
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user