From 510547f11e7fd8855d5ac042875b9dc044e18c17 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 1 Jun 2024 22:10:25 +0200 Subject: [PATCH] Fix commiting changes in /etc/nginx --- wo/cli/plugins/stack.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 51071b3..7d3ad7e 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -286,6 +286,7 @@ class WOStackController(CementBaseController): # brotli if pargs.brotli: Log.wait(self, "Enabling Brotli") + WOGit.add(self, ["/etc/nginx"], msg="Commiting pending changes") if os.path.exists('/etc/nginx/conf.d/brotli.conf.disabled'): WOFileUtils.mvfile(self, '/etc/nginx/conf.d/brotli.conf.disabled', '/etc/nginx/conf.d/brotli.conf') @@ -297,11 +298,11 @@ class WOStackController(CementBaseController): '/etc/nginx/conf.d/gzip.conf.disabled') if check_config(self): Log.valide(self, "Enabling Brotli") - WOGit.add(self, "/etc/nginx") + WOGit.add(self, ["/etc/nginx"], msg="Enabling Brotli") WOService.reload_service(self, "nginx") else: Log.failed(self, "Enabling Brotli") - WOGit.rollback(self, '/etc/nginx') + WOGit.rollback(self, ["/etc/nginx"]) # PHPMYADMIN if pargs.phpmyadmin: @@ -684,6 +685,7 @@ class WOStackController(CementBaseController): # brotli if pargs.brotli: Log.wait(self, "Disabling Brotli") + WOGit.add(self, ["/etc/nginx"], msg="Commiting pending changes") if os.path.exists('/etc/nginx/conf.d/brotli.conf'): WOFileUtils.mvfile(self, '/etc/nginx/conf.d/brotli.conf', '/etc/nginx/conf.d/brotli.conf.disabled') @@ -695,11 +697,11 @@ class WOStackController(CementBaseController): '/etc/nginx/conf.d/gzip.conf') if check_config(self): Log.valide(self, "Disabling Brotli") - WOGit.add(self, "/etc/nginx") + WOGit.add(self, ["/etc/nginx"], msg="Disabling Brotli") WOService.reload_service(self, "nginx") else: Log.failed(self, "Disabling Brotli") - WOGit.rollback(self, '/etc/nginx') + WOGit.rollback(self, ["/etc/nginx"]) # UFW if pargs.ufw: