Improve wo update
This commit is contained in:
@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- Sysctl tweaks are applied during stack install and removed from install script
|
||||
- Nginx systemd tweaks during Nginx install/upgrade and removed from install script
|
||||
- Initial creation of .gitconfig is displayed the first time you run the command `wo`
|
||||
- Added `/var/lib/php/sessions/` to open_basedir to allow php sessions storage
|
||||
|
||||
#### Fixed
|
||||
|
||||
|
||||
@@ -22,12 +22,17 @@ class WOUpdateController(CementBaseController):
|
||||
arguments = [
|
||||
(['--force'],
|
||||
dict(help='Force WordOps update', action='store_true')),
|
||||
(['--preserve'],
|
||||
dict(help='Preserve current Nginx configuration',
|
||||
action='store_true')),
|
||||
(['--beta'],
|
||||
dict(help='Update WordOps to latest beta release',
|
||||
dict(help='Update WordOps to latest mainline release '
|
||||
'(same than --mainline)',
|
||||
action='store_true')),
|
||||
(['--mainline'],
|
||||
dict(help='Update WordOps to latest mainline release',
|
||||
action='store_true')),
|
||||
(['--branch'],
|
||||
dict(help="Update WordOps from a specific repository branch ",
|
||||
action='store' or 'store_const',
|
||||
const='develop', nargs='?')),
|
||||
(['--travis'],
|
||||
dict(help='Argument used only for WordOps development',
|
||||
action='store_true')),
|
||||
@@ -38,17 +43,15 @@ class WOUpdateController(CementBaseController):
|
||||
def default(self):
|
||||
pargs = self.app.pargs
|
||||
filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S")
|
||||
|
||||
if pargs.beta:
|
||||
wo_branch = "beta"
|
||||
install_args = ""
|
||||
install_args = ""
|
||||
if pargs.mainline or pargs.beta:
|
||||
wo_branch = "mainline"
|
||||
elif pargs.branch:
|
||||
wo_branch = pargs.branch
|
||||
else:
|
||||
wo_branch = "master"
|
||||
install_args = ""
|
||||
if pargs.force:
|
||||
install_args = install_args + "--force "
|
||||
if pargs.preserve:
|
||||
install_args = install_args + "--preserve "
|
||||
|
||||
if not os.path.isdir('/var/lib/wo/tmp'):
|
||||
os.makedirs('/var/lib/wo/tmp')
|
||||
@@ -59,13 +62,14 @@ class WOUpdateController(CementBaseController):
|
||||
"update script"]])
|
||||
|
||||
if pargs.travis:
|
||||
try:
|
||||
Log.info(self, "updating WordOps, please wait...")
|
||||
os.system("/bin/bash install --travis "
|
||||
"-b $TRAVIS_BRANCH --force")
|
||||
except OSError as e:
|
||||
Log.debug(self, str(e))
|
||||
Log.error(self, "WordOps update failed !")
|
||||
if os.path.isfile('install'):
|
||||
try:
|
||||
Log.info(self, "updating WordOps, please wait...")
|
||||
os.system("/bin/bash install --travis "
|
||||
"--force")
|
||||
except OSError as e:
|
||||
Log.debug(self, str(e))
|
||||
Log.error(self, "WordOps update failed !")
|
||||
else:
|
||||
try:
|
||||
Log.info(self, "updating WordOps, please wait...")
|
||||
@@ -76,6 +80,8 @@ class WOUpdateController(CementBaseController):
|
||||
Log.debug(self, str(e))
|
||||
Log.error(self, "WordOps update failed !")
|
||||
|
||||
os.remove("/var/lib/wo/tmp/{0}".format(filename))
|
||||
|
||||
|
||||
def load(app):
|
||||
# register the plugin class.. this only happens if the plugin is enabled
|
||||
|
||||
@@ -20,4 +20,4 @@ listen.backlog = 32768
|
||||
catch_workers_output = yes
|
||||
|
||||
|
||||
{{#openbasedir}}php_admin_value[open_basedir] = "/var/www/:/usr/share/php/:/tmp/:/var/run/nginx-cache/:/dev/urandom:/dev/shm"{{/openbasedir}}
|
||||
{{#openbasedir}}php_admin_value[open_basedir] = "/var/www/:/usr/share/php/:/tmp/:/var/run/nginx-cache/:/dev/urandom:/dev/shm:/var/lib/php/sessions/"{{/openbasedir}}
|
||||
|
||||
Reference in New Issue
Block a user