From 0e8fcaa5309e44ecb374c77f0791795426910899 Mon Sep 17 00:00:00 2001 From: jaydee Date: Sat, 21 Mar 2026 21:53:36 +0100 Subject: [PATCH] build --- portainer/__pycache__/api.cpython-313.pyc | Bin 59390 -> 59456 bytes portainer/api.py | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/portainer/__pycache__/api.cpython-313.pyc b/portainer/__pycache__/api.cpython-313.pyc index 4fabaa211fe2d05f019fdbca350ecf67a0923771..0773f340473b28186c88ae3fefb719c82d1a4ea8 100644 GIT binary patch delta 273 zcmex&p83E9X5P=dyj%=Gkoa$3=K77iM@}<|v24D4dI96)?4z8MtIoP}1ha&)u`mS5 zPEITrnOtkdG5P*c*2%}tMli}x4%849=L{AI7PMr_;|dmzRsxv>0zoR1J61k-T?8t9e#u(KOu$`<>9`V?2M6nM9exjH*5lTUK=uh{Ru7KNc9#!`006YESq1j*a+~L#7h_};ntb7e^5p9mG$*rOjAMK>IpyMJ#wn8}E~&CA244^enH+xU sBICEonwPC*lm*=Rn2z&txtp*am*98TXFaaY2x9BAx|?inxO_ka06Z5+VgLXD diff --git a/portainer/api.py b/portainer/api.py index 8b5da87..4ea3692 100644 --- a/portainer/api.py +++ b/portainer/api.py @@ -1258,6 +1258,7 @@ class PortainerApi: """Stop one stack or all stacks on an endpoint.""" # print(f"Stopping stack {stack}") + protected_stack = ['hashicorp','nginx','pihole',] ok = "\033[92m✔\033[0m" ok2 = "\033[93m✔\033[0m" err = "\033[91m✖\033[0m" @@ -1274,6 +1275,10 @@ class PortainerApi: size = size + 5 self.stack_ids = list(dict.fromkeys(self.stack_ids)) for stck in self.stack_ids: + if self.stacks_all[self.endpoint_id]['by_id'] in protected_stack: + ans = input(f"Really stop {self.stacks_all[self.endpoint_id]['by_id'][stck]} ? ") or "n" + if ans != "y": + continue print( f"Stopping stack {self.stacks_all[self.endpoint_id]['by_id'][stck][:size].ljust(size)}", end="",