mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
WP Staging: Exclude some folders
This commit is contained in:
@@ -1262,7 +1262,7 @@ class Upgrade:
|
|||||||
for items in data:
|
for items in data:
|
||||||
if items.find("CommonMiddleware") > -1:
|
if items.find("CommonMiddleware") > -1:
|
||||||
if csrfCheck == 1:
|
if csrfCheck == 1:
|
||||||
writeToFile.writelines(" 'django.middleware.common.CommonMiddleware',\n")
|
writeToFile.writelines(" 'django.middleware.csrf.CsrfViewMiddleware',\n")
|
||||||
|
|
||||||
if items.find("'filemanager',") > -1:
|
if items.find("'filemanager',") > -1:
|
||||||
writeToFile.writelines(items)
|
writeToFile.writelines(items)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from plogical.mysqlUtilities import mysqlUtilities
|
|||||||
from random import randint
|
from random import randint
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class StagingSetup(multi.Thread):
|
class StagingSetup(multi.Thread):
|
||||||
|
|
||||||
def __init__(self, function, extraArgs):
|
def __init__(self, function, extraArgs):
|
||||||
@@ -23,7 +24,7 @@ class StagingSetup(multi.Thread):
|
|||||||
elif self.function == 'startSyncing':
|
elif self.function == 'startSyncing':
|
||||||
self.startSyncing()
|
self.startSyncing()
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
logging.writeToFile( str(msg) + ' [StagingSetup.run]')
|
logging.writeToFile(str(msg) + ' [StagingSetup.run]')
|
||||||
|
|
||||||
def startCloning(self):
|
def startCloning(self):
|
||||||
try:
|
try:
|
||||||
@@ -64,7 +65,8 @@ class StagingSetup(multi.Thread):
|
|||||||
|
|
||||||
masterPath = '/home/%s/public_html' % (masterDomain)
|
masterPath = '/home/%s/public_html' % (masterDomain)
|
||||||
|
|
||||||
command = 'rsync -avzh --exclude "%s" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (domain, masterPath, path)
|
command = 'rsync -avzh --exclude "%s" --exclude "wp-content/backups" --exclude "wp-content/updraft" --exclude "wp-content/cache" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (
|
||||||
|
domain, masterPath, path)
|
||||||
ProcessUtilities.executioner(command, website.externalApp)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
logging.statusWriter(tempStatusPath, 'Data copied..,50')
|
logging.statusWriter(tempStatusPath, 'Data copied..,50')
|
||||||
|
|||||||
Reference in New Issue
Block a user