53 lines
2.0 KiB
Python
53 lines
2.0 KiB
Python
import os
|
|
import shutil
|
|
|
|
from cement.core import handler, hook
|
|
from cement.core.controller import CementBaseController, expose
|
|
|
|
from wo.cli.plugins.stack_pref import post_pref, pre_pref
|
|
from wo.core.aptget import WOAptGet
|
|
from wo.core.download import WODownload
|
|
from wo.core.extract import WOExtract
|
|
from wo.core.fileutils import WOFileUtils
|
|
from wo.core.logging import Log
|
|
from wo.core.services import WOService
|
|
from wo.core.shellexec import WOShellExec
|
|
from wo.core.variables import WOVariables
|
|
|
|
|
|
class WOStackUpgradeController(CementBaseController):
|
|
class Meta:
|
|
label = 'config'
|
|
stacked_on = 'stack'
|
|
stacked_type = 'nested'
|
|
exit_on_close = True
|
|
description = ('Upgrade stack safely')
|
|
arguments = [
|
|
(['--nginx'],
|
|
dict(help='Upgrade all stack', action='store_true')),
|
|
(['--php'],
|
|
dict(help='Upgrade PHP 7.2 stack', action='store_true')),
|
|
(['--php73'],
|
|
dict(help='Upgrade PHP 7.3 stack', action='store_true')),
|
|
(['--mysql'],
|
|
dict(help='Upgrade MySQL stack', action='store_true')),
|
|
(['--wpcli'],
|
|
dict(help='Upgrade WPCLI', action='store_true')),
|
|
(['--redis'],
|
|
dict(help='Upgrade Redis', action='store_true')),
|
|
(['--netdata'],
|
|
dict(help='Upgrade Netdata', action='store_true')),
|
|
(['--dashboard'],
|
|
dict(help='Upgrade WordOps Dashboard', action='store_true')),
|
|
(['--composer'],
|
|
dict(help='Upgrade Composer', action='store_true')),
|
|
(['--phpmyadmin'],
|
|
dict(help='Upgrade phpMyAdmin', action='store_true')),
|
|
(['--no-prompt'],
|
|
dict(help="Upgrade Packages without any prompt",
|
|
action='store_true')),
|
|
(['--force'],
|
|
dict(help="Force Packages upgrade without any prompt",
|
|
action='store_true')),
|
|
]
|