From 08b3c90bed18c6172ce881785b2ebb475c9fcfdf Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Fri, 1 Jan 2016 17:12:53 +0530 Subject: [PATCH] stop nginx services before removing --- ee/cli/plugins/stack.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 0d9814b3..402c01ea 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -2,7 +2,7 @@ from cement.core.controller import CementBaseController, expose from cement.core import handler, hook -from ee.cli.plugins.site_functions import SiteError +from ee.cli.plugins.site_functions import * from ee.core.variables import EEVariables from ee.core.aptget import EEAptGet from ee.core.download import EEDownload @@ -1927,10 +1927,12 @@ class EEStackController(CementBaseController): packages = packages + ['/etc/nginx/conf.d/pagespeed.conf'] if self.app.pargs.nginx: + EEService.stop_service(self, 'nginx') Log.debug(self, "Removing apt_packages variable of Nginx") apt_packages = apt_packages + EEVariables.ee_nginx if self.app.pargs.nginxmainline: + EEService.stop_service(self, 'nginx') Log.debug(self, "Removing apt_packages variable of Nginx MAINLINE") apt_packages = apt_packages + EEVariables.ee_nginx_dev @@ -2067,9 +2069,11 @@ class EEStackController(CementBaseController): packages = packages + ['/etc/nginx/conf.d/pagespeed.conf'] if self.app.pargs.nginx: + EEService.stop_service(self, 'nginx') Log.debug(self, "Purge apt_packages variable of Nginx") apt_packages = apt_packages + EEVariables.ee_nginx if self.app.pargs.nginxmainline: + EEService.stop_service(self, 'nginx') Log.debug(self, "Purge apt_packages variable of Nginx Mainline") apt_packages = apt_packages + EEVariables.ee_nginx_dev if self.app.pargs.php: