Add stack_pref

This commit is contained in:
VirtuBox
2019-08-05 04:56:33 +02:00
parent 8e0384d7e1
commit cd62916cfc
3 changed files with 1364 additions and 1337 deletions

File diff suppressed because it is too large Load Diff

1357
wo/cli/plugins/stack_pref.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,8 @@
import os
import shutil
from cement.core import handler, hook
from cement.core.controller import CementBaseController, expose
from wo.cli.plugins.stack import WOStackController
from cement.core import handler, hook
from wo.core.apt_repo import WORepo
from wo.core.aptget import WOAptGet
from wo.core.download import WODownload
@@ -13,6 +12,7 @@ from wo.core.logging import Log
from wo.core.services import WOService
from wo.core.shellexec import WOShellExec
from wo.core.variables import WOVariables
from wo.cli.plugins.stack_pref import post_pref
class WOStackUpgradeController(CementBaseController):
@@ -86,8 +86,6 @@ class WOStackUpgradeController(CementBaseController):
apt_packages = []
packages = []
empty_packages = []
stack = WOStackController()
stack.app = self.app
if ((not self.app.pargs.web) and (not self.app.pargs.nginx) and
(not self.app.pargs.php) and (not self.app.pargs.mysql) and
@@ -192,7 +190,7 @@ class WOStackUpgradeController(CementBaseController):
WOAptGet.update(self)
# Update packages
WOAptGet.install(self, apt_packages)
stack.post_pref(apt_packages, empty_packages)
post_pref(self, apt_packages, empty_packages)
# Post Actions after package updates
if (set(WOVariables.wo_nginx).issubset(set(apt_packages))):
WOService.restart_service(self, 'nginx')