From 4b00416fe14c37fef4c8ab7fc8b1103a8772f6b2 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 18 Jul 2019 19:14:24 +0200 Subject: [PATCH] Force nginx config install only for old releases --- install | 6 ++++-- wo/cli/plugins/stack.py | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/install b/install index ca6db89..d3df375 100755 --- a/install +++ b/install @@ -681,8 +681,10 @@ if [ -x /usr/local/bin/wo ]; then fi if [ -z "$wo_preserve_config" ]; then if [ -n "$(command -v nginx)" ]; then - wo_lib_echo "Upgrading Nginx" | tee -ai $wo_install_log - wo_upgrade_nginx | tee -ai $wo_install_log + if [ ! -f /etc/nginx/common/release ] || [[ -z $(grep "v3.9.5." /etc/nginx/common/release) && -z $(grep "v3.9.6" /etc/nginx/common/release) ]]; then + wo_lib_echo "Upgrading Nginx" | tee -ai $wo_install_log + wo_upgrade_nginx | tee -ai $wo_install_log + fi fi fi wo_update_latest | tee -ai $wo_install_log diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index adb2283..e4ab4b7 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -1520,7 +1520,6 @@ class WOStackController(CementBaseController): "/master/mysqltuner.pl", "/usr/bin/mysqltuner", "MySQLTuner"]] - else: Log.debug(self, "MySQL connection is already alive") Log.info(self, "MySQL connection is already alive") @@ -2067,6 +2066,9 @@ class WOStackController(CementBaseController): "libexec/netdata-" "uninstaller.sh -y -f") + if (set(["fail2ban"]).issubset(set(apt_packages))): + WOService.stop_service(self, 'fail2ban') + if (apt_packages): Log.info(self, "Purging packages, please wait...") WOAptGet.remove(self, apt_packages, purge=True)