From 22f547d4d702535075a4b8dc7d37cfd00427be0a Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Wed, 9 Sep 2015 17:04:38 +0530 Subject: [PATCH] do not install nginx-custom if nginx-plus installed --- ee/cli/plugins/site_functions.py | 5 +++-- ee/cli/plugins/stack.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index 19e9543b..04d99909 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -661,9 +661,10 @@ def site_package_check(self, stype): if EEAptGet.is_installed(self, 'nginx-plus'): # do something # do post nginx installation configuration - print("NGINX-PLUS detected ...") + Log.info(self, "NGINX PLUS Detected ...") + Log.info(self, + "Installing EasyEngine Configurations for NGINX PLUS") apt = ["nginx-plus"] + EEVariables.ee_nginx - packages = [] #apt_packages = apt_packages + EEVariables.ee_nginx stack.post_pref(apt, packages) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index d6cd6707..211ea8bd 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -449,7 +449,7 @@ class EEStackController(CementBaseController): " /etc/nginx/nginx.conf") # EasyEngine config for NGINX plus - data['version'] = EEVariables.ee_version + data['version'] = EEVariables.ee_version Log.debug(self, 'Writting for nginx plus configuration' ' to file /etc/nginx/conf.d/ee-plus.conf') ee_nginx = open('/etc/nginx/conf.d/ee-plus.conf', @@ -1605,7 +1605,15 @@ class EEStackController(CementBaseController): Log.debug(self, "Setting apt_packages variable for Nginx") if not EEAptGet.is_installed(self, 'nginx-custom'): - apt_packages = apt_packages + EEVariables.ee_nginx + if not EEAptGet.is_installed(self, 'nginx-plus'): + apt_packages = apt_packages + EEVariables.ee_nginx + else: + Log.info(self, "NGINX PLUS Detected ...") + Log.info(self, + "Installing EasyEngine Configurations for NGINX PLUS") + apt = ["nginx-plus"] + EEVariables.ee_nginx + #apt_packages = apt_packages + EEVariables.ee_nginx + self.post_pref(apt, packages) else: Log.debug(self, "Nginx already installed") Log.info(self, "Nginx already installed")