mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-09 23:06:16 +01:00
bug fix in do check
This commit is contained in:
@@ -55,10 +55,15 @@ class mysqlUtilities:
|
|||||||
if res == 1:
|
if res == 1:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
if remote:
|
||||||
|
|
||||||
### DO Check
|
### DO Check
|
||||||
|
|
||||||
if mysqlData['mysqlhost'].find('ondigitalocean') > -1:
|
if mysqlData['mysqlhost'].find('ondigitalocean') > -1:
|
||||||
|
|
||||||
alterUserPassword = "ALTER USER 'cyberpanel'@'%s' IDENTIFIED WITH mysql_native_password BY '%s'" % (publicip, dbpassword)
|
alterUserPassword = "ALTER USER 'cyberpanel'@'%s' IDENTIFIED WITH mysql_native_password BY '%s'" % (
|
||||||
|
publicip, dbpassword)
|
||||||
command = initCommand + alterUserPassword + '"'
|
command = initCommand + alterUserPassword + '"'
|
||||||
|
|
||||||
if install.preFlightsChecks.debug:
|
if install.preFlightsChecks.debug:
|
||||||
@@ -68,7 +73,8 @@ class mysqlUtilities:
|
|||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
|
|
||||||
if remote:
|
## RDS Check
|
||||||
|
|
||||||
if mysqlData['mysqlhost'].find('rds.amazon') == -1:
|
if mysqlData['mysqlhost'].find('rds.amazon') == -1:
|
||||||
dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip)
|
dropDB = "GRANT ALL PRIVILEGES ON " + dbname + ".* TO '" + dbuser + "'@'%s'" % (publicip)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import hashlib
|
|||||||
class ApplicationInstaller(multi.Thread):
|
class ApplicationInstaller(multi.Thread):
|
||||||
|
|
||||||
LOCALHOST = 'localhost'
|
LOCALHOST = 'localhost'
|
||||||
|
REMOTE = 0
|
||||||
|
PORT = '3306'
|
||||||
|
|
||||||
def __init__(self, installApp, extraArgs):
|
def __init__(self, installApp, extraArgs):
|
||||||
multi.Thread.__init__(self)
|
multi.Thread.__init__(self)
|
||||||
@@ -421,9 +423,10 @@ $parameters = array(
|
|||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
jsonData = json.loads(open(passFile, 'r').read())
|
jsonData = json.loads(open(passFile, 'r').read())
|
||||||
|
|
||||||
mysqlhost = jsonData['mysqlhost']
|
mysqlhost = jsonData['mysqlhost']
|
||||||
ApplicationInstaller.LOCALHOST = mysqlhost
|
ApplicationInstaller.LOCALHOST = mysqlhost
|
||||||
|
ApplicationInstaller.REMOTE = 1
|
||||||
|
ApplicationInstaller.PORT = jsonData['mysqlport']
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user