Hotfix for wo update

This commit is contained in:
VirtuBox
2019-06-18 14:35:05 +02:00
parent 9efc58ef47
commit 6980aed456
4 changed files with 90 additions and 88 deletions

View File

@@ -22,6 +22,9 @@ class WOUpdateController(CementBaseController):
arguments = [
(['--force'],
dict(help='Force WordOps update', action='store_true')),
(['--preserve'],
dict(help='Preserve current Nginx configuration',
action='store_true')),
(['--travis'],
dict(help='Argument used only for WordOps development',
action='store_true')),
@@ -55,6 +58,13 @@ class WOUpdateController(CementBaseController):
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
elif self.app.pargs.preserve:
try:
Log.info(self, "updating WordOps, please wait...")
os.system("bash /tmp/{0} --preserve".format(filename))
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
else:
try:
Log.info(self, "updating WordOps, please wait...")