From 0b3a2d43cba123b6693f980de1d4ced723b9df92 Mon Sep 17 00:00:00 2001 From: Rikard Danielsson Date: Thu, 6 Mar 2025 15:42:32 +0100 Subject: [PATCH] buckets needs to be reset each loop --- templates/application/check_nextcloud_mounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/application/check_nextcloud_mounts.py b/templates/application/check_nextcloud_mounts.py index 05fd9ff..8e33300 100644 --- a/templates/application/check_nextcloud_mounts.py +++ b/templates/application/check_nextcloud_mounts.py @@ -7,7 +7,6 @@ import subprocess import sys exit = 0 -buckets = [] bucket_count = {} containers = {} base_message = "OK: no duplicate mounts" @@ -17,6 +16,7 @@ get_containers = subprocess.Popen('/usr/local/bin/get_containers', stdout=subpro containers = get_containers.decode().splitlines() for i, container in enumerate(containers, start=1): + buckets = [] list_command = f"/usr/local/bin/nocc {container} files_external:list --all --show-password --output json" command = shlex.split(list_command) mount_data_byte = subprocess.Popen(command, stdout=subprocess.PIPE).stdout.read()