From 287d283f65c86c6e70e0455194b2268ac9d70fa6 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Mon, 19 Jan 2015 15:01:08 +0530 Subject: [PATCH] Added default action for ee stack --- ee/cli/plugins/stack.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 4c54bd8b..5c70d859 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -913,6 +913,15 @@ class EEStackController(CementBaseController): def install(self, packages=[], apt_packages=[]): self.msg = [] try: + # Default action for stack installation + if ((not self.app.pargs.web) and (not self.app.pargs.admin) and + (not self.app.pargs.mail) and (not self.app.pargs.nginx) and + (not self.app.pargs.php) and (not self.app.pargs.mysql) and + (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and + (not self.app.pargs.phpmyadmin) and + (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + self.app.pargs.web = True + if self.app.pargs.web: Log.debug(self, "Setting apt_packages variable for Nginx ,PHP" " ,MySQL ") @@ -1075,6 +1084,15 @@ class EEStackController(CementBaseController): apt_packages = [] packages = [] + # Default action for stack remove + if ((not self.app.pargs.web) and (not self.app.pargs.admin) and + (not self.app.pargs.mail) and (not self.app.pargs.nginx) and + (not self.app.pargs.php) and (not self.app.pargs.mysql) and + (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and + (not self.app.pargs.phpmyadmin) and + (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + self.app.pargs.web = True + if self.app.pargs.web: self.app.pargs.nginx = True self.app.pargs.php = True @@ -1140,6 +1158,15 @@ class EEStackController(CementBaseController): apt_packages = [] packages = [] + # Default action for stack purge + if ((not self.app.pargs.web) and (not self.app.pargs.admin) and + (not self.app.pargs.mail) and (not self.app.pargs.nginx) and + (not self.app.pargs.php) and (not self.app.pargs.mysql) and + (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and + (not self.app.pargs.phpmyadmin) and + (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + self.app.pargs.web = True + if self.app.pargs.web: self.app.pargs.nginx = True self.app.pargs.php = True