mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 00:36:10 +01:00
Merge branch 'v1.9.4' into v1.9.5
This commit is contained in:
@@ -28,7 +28,10 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
self.installApp = installApp
|
self.installApp = installApp
|
||||||
self.extraArgs = extraArgs
|
self.extraArgs = extraArgs
|
||||||
if extraArgs != None:
|
if extraArgs != None:
|
||||||
|
try:
|
||||||
self.tempStatusPath = self.extraArgs['tempStatusPath']
|
self.tempStatusPath = self.extraArgs['tempStatusPath']
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
@@ -633,7 +636,12 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
command = 'git clone --depth 1 --no-single-branch git@' + defaultProvider + '.com:' + username + '/' + reponame + '.git -b ' + branch + ' ' + finalPath
|
command = 'git clone --depth 1 --no-single-branch git@' + defaultProvider + '.com:' + username + '/' + reponame + '.git -b ' + branch + ' ' + finalPath
|
||||||
ProcessUtilities.executioner(command, externalApp)
|
output = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
if output.find('Checking out files: 100%') == -1:
|
||||||
|
statusFile = open(tempStatusPath, 'w')
|
||||||
|
statusFile.writelines('%s. [404]' % (output))
|
||||||
|
statusFile.close()
|
||||||
|
return 0
|
||||||
except subprocess.CalledProcessError as msg:
|
except subprocess.CalledProcessError as msg:
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines(
|
statusFile.writelines(
|
||||||
@@ -688,7 +696,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
logging.writeToFile('Git is not setup for this website.')
|
logging.writeToFile('Git is not setup for this website.')
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
command = 'sudo git --git-dir=' + finalPath + '.git --work-tree=' + finalPath + ' pull'
|
command = 'git --git-dir=' + finalPath + '.git --work-tree=' + finalPath + ' pull'
|
||||||
ProcessUtilities.executioner(command, externalApp)
|
ProcessUtilities.executioner(command, externalApp)
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -696,7 +704,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
website = Websites.objects.get(domain=domain)
|
website = Websites.objects.get(domain=domain)
|
||||||
externalApp = website.externalApp
|
externalApp = website.externalApp
|
||||||
|
|
||||||
command = "sudo chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
command = "chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
||||||
ProcessUtilities.executioner(command, externalApp)
|
ProcessUtilities.executioner(command, externalApp)
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@@ -727,15 +735,15 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
childDomain = ChildDomains.objects.get(domain=domain)
|
childDomain = ChildDomains.objects.get(domain=domain)
|
||||||
finalPath = childDomain.path
|
finalPath = childDomain.path
|
||||||
|
|
||||||
command = 'sudo rm -rf ' + finalPath
|
command = 'rm -rf ' + finalPath
|
||||||
ProcessUtilities.executioner(command, website.externalApp)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
command = 'sudo mkdir ' + finalPath
|
command = 'mkdir ' + finalPath
|
||||||
ProcessUtilities.executioner(command, website.externalApp)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
command = "sudo chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
command = "chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
||||||
ProcessUtilities.executioner(command, website.externalApp)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
gitPath = '/home/cyberpanel/' + domain + '.git'
|
gitPath = '/home/cyberpanel/' + domain + '.git'
|
||||||
|
|||||||
Reference in New Issue
Block a user