Skip to content

Commit 2585403

Browse files
committed
bug fix: wp stating
1 parent 963a5de commit 2585403

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

api/tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def test_submitUserCreation(self):
163163
"securityLevel": "HIGH",
164164
}
165165
response = self.MakeRequest('submitUserCreation', data_ret)
166-
logging.writeToFile(str(response))
167166

168167
self.assertEqual(response['status'], 1)
169168

websiteFunctions/StagingSetup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def run(self):
2929
def startCloning(self):
3030
try:
3131
tempStatusPath = self.extraArgs['tempStatusPath']
32+
self.tempStatusPath = tempStatusPath
3233
masterDomain = self.extraArgs['masterDomain']
3334
domain = self.extraArgs['domain']
3435
admin = self.extraArgs['admin']
@@ -102,7 +103,6 @@ def startCloning(self):
102103
else:
103104
raise BaseException('Failed to create database backup.')
104105

105-
106106
databasePath = '%s/%s.sql' % ('/home/cyberpanel', dbName)
107107

108108
command = "sed -i 's/%s/%s/g' %s" % (masterDomain, domain, databasePath)
@@ -145,12 +145,15 @@ def startCloning(self):
145145
writeToFile.close()
146146

147147
command = 'mv %s %s' % (tmp, pathFinalConfig)
148-
ProcessUtilities.executioner(command, website.externalApp)
148+
ProcessUtilities.executioner(command)
149+
150+
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, pathFinalConfig)
151+
ProcessUtilities.executioner(command)
149152

150153
logging.statusWriter(tempStatusPath, 'Database synced..,100')
151154

152155
try:
153-
os.path.remove(databasePath)
156+
os.remove(databasePath)
154157
except:
155158
pass
156159

@@ -159,7 +162,7 @@ def startCloning(self):
159162
return 0
160163
except BaseException, msg:
161164
mesg = '%s. [404]' % (str(msg))
162-
logging.statusWriter(tempStatusPath, mesg)
165+
logging.statusWriter(self.tempStatusPath, mesg)
163166

164167
def startSyncing(self):
165168
try:

0 commit comments

Comments
 (0)