mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix: remove skip-name-resolve
This commit is contained in:
@@ -931,7 +931,7 @@ password=%s
|
|||||||
|
|
||||||
data = open(cnfPath, 'r').read()
|
data = open(cnfPath, 'r').read()
|
||||||
|
|
||||||
if data.find('bind-address') > -1 and data.find('skip-name-resolve') > -1:
|
if data.find('bind-address'):
|
||||||
print('1,None')
|
print('1,None')
|
||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
@@ -943,7 +943,6 @@ password=%s
|
|||||||
mysqldContent = '''
|
mysqldContent = '''
|
||||||
[mysqld]
|
[mysqld]
|
||||||
bind-address=%s
|
bind-address=%s
|
||||||
skip-name-resolve
|
|
||||||
''' % (ipAddressLocal)
|
''' % (ipAddressLocal)
|
||||||
|
|
||||||
writeToFile = open(cnfPath, 'a')
|
writeToFile = open(cnfPath, 'a')
|
||||||
|
|||||||
@@ -191,12 +191,18 @@ class StagingSetup(multi.Thread):
|
|||||||
logging.statusWriter(tempStatusPath, 'Syncing databases..,10')
|
logging.statusWriter(tempStatusPath, 'Syncing databases..,10')
|
||||||
|
|
||||||
command = 'wp --allow-root --skip-plugins --skip-themes --path=%s db export %s/dbexport-stage.sql' % (child.path, masterPath)
|
command = 'wp --allow-root --skip-plugins --skip-themes --path=%s db export %s/dbexport-stage.sql' % (child.path, masterPath)
|
||||||
ProcessUtilities.executioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(result)
|
||||||
|
|
||||||
## Restore to master domain
|
## Restore to master domain
|
||||||
|
|
||||||
command = 'wp --allow-root --skip-plugins --skip-themes --path=%s --quiet db import %s/dbexport-stage.sql' % (masterPath, masterPath)
|
command = 'wp --allow-root --skip-plugins --skip-themes --path=%s --quiet db import %s/dbexport-stage.sql' % (masterPath, masterPath)
|
||||||
ProcessUtilities.executioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(result)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
command = 'rm -f %s/dbexport-stage.sql' % (masterPath)
|
command = 'rm -f %s/dbexport-stage.sql' % (masterPath)
|
||||||
@@ -211,6 +217,9 @@ class StagingSetup(multi.Thread):
|
|||||||
command = 'wp theme path --allow-root --skip-plugins --skip-themes --path=%s' % (masterPath)
|
command = 'wp theme path --allow-root --skip-plugins --skip-themes --path=%s' % (masterPath)
|
||||||
WpContentPath = ProcessUtilities.outputExecutioner(command).splitlines()[-1].replace('wp-content/themes', '')
|
WpContentPath = ProcessUtilities.outputExecutioner(command).splitlines()[-1].replace('wp-content/themes', '')
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(WpContentPath)
|
||||||
|
|
||||||
command = 'cp -R %s/wp-content/ %s' % (child.path, WpContentPath)
|
command = 'cp -R %s/wp-content/ %s' % (child.path, WpContentPath)
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
@@ -222,10 +231,16 @@ class StagingSetup(multi.Thread):
|
|||||||
## Search and replace url
|
## Search and replace url
|
||||||
|
|
||||||
command = 'wp search-replace --allow-root --skip-plugins --skip-themes --path=%s "%s" "%s"' % (masterPath, child.domain, replaceDomain)
|
command = 'wp search-replace --allow-root --skip-plugins --skip-themes --path=%s "%s" "%s"' % (masterPath, child.domain, replaceDomain)
|
||||||
ProcessUtilities.executioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(result)
|
||||||
|
|
||||||
command = 'wp search-replace --allow-root --skip-plugins --skip-themes --path=%s "www.%s" "%s"' % (masterPath, child.domain, replaceDomain)
|
command = 'wp search-replace --allow-root --skip-plugins --skip-themes --path=%s "www.%s" "%s"' % (masterPath, child.domain, replaceDomain)
|
||||||
ProcessUtilities.executioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.writeToFile(result)
|
||||||
|
|
||||||
from filemanager.filemanager import FileManager
|
from filemanager.filemanager import FileManager
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user