From ca19fc67192d59f3112e89f0e808e061cc69e7b9 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 20 Jan 2016 13:32:16 +0530 Subject: [PATCH] Add nginx mainline to restart on upgrade --- ee/cli/plugins/stack_upgrade.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ee/cli/plugins/stack_upgrade.py b/ee/cli/plugins/stack_upgrade.py index 815bc054..4801b7b1 100644 --- a/ee/cli/plugins/stack_upgrade.py +++ b/ee/cli/plugins/stack_upgrade.py @@ -122,7 +122,12 @@ class EEStackUpgradeController(CementBaseController): self.app.pargs.mail = True if self.app.pargs.web: - self.app.pargs.nginx = True + if EEAptGet.is_installed(self, 'nginx-custom'): + self.app.pargs.nginx = True + elif EEAptGet.is_installed(self, 'nginx-mainline'): + self.app.pargs.nginxmainline = True + else: + Log.info(self, "Nginx is not already installed") self.app.pargs.php = True self.app.pargs.mysql = True self.app.pargs.postfix = True @@ -141,13 +146,17 @@ class EEStackUpgradeController(CementBaseController): else: Log.info(self, "Mail server is not installed") - if self.app.pargs.nginx or self.app.pargs.nginxmainline: + if self.app.pargs.nginx : if EEAptGet.is_installed(self, 'nginx-custom'): apt_packages = apt_packages + EEVariables.ee_nginx - elif EEAptGet.is_installed(self, 'nginx-mainline'): + else: + Log.info(self, "Nginx Stable is not already installed") + + if self.app.pargs.nginxmainline: + if EEAptGet.is_installed(self, 'nginx-mainline'): apt_packages = apt_packages + EEVariables.ee_nginx_dev else: - Log.info(self, "Nginx is not already installed") + Log.info(self, "Nginx Mainline is not already installed") if self.app.pargs.php: if EEAptGet.is_installed(self, 'php5-fpm'):