This commit is contained in:
2026-03-21 21:53:36 +01:00
parent df151c4c7f
commit 0e8fcaa530
2 changed files with 5 additions and 0 deletions
Binary file not shown.
+5
View File
@@ -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="",