From 3007fc6de49be19bdff27db9fc3c1e3f204e7e73 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 27 Feb 2025 11:09:29 +0100 Subject: [PATCH] shfmt --- templates/application/scan_external_mounts.sh | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/application/scan_external_mounts.sh b/templates/application/scan_external_mounts.sh index aed89b6..bbe29a8 100644 --- a/templates/application/scan_external_mounts.sh +++ b/templates/application/scan_external_mounts.sh @@ -7,27 +7,27 @@ if [[ $(pgrep -f "${0}" | wc -l) -eq 2 ]]; then # We sleep a deterministic amount of time, which will be between 0 an 128 m and allways the same within # a specific host, but will differ between hosts sleep $((16#$(ip a | grep "link/ether" | head -1 | awk -F ':' '{print $6}' | awk '{print $1}') / 2))m - errors='' + errors='' for container in $(get_containers); do - error_ids="${error_ids} ${container}: " + error_ids="${error_ids} ${container}: " for id in $(nocc "${container}" files_external:list --all --output json | jq '.[].mount_id' | jq .); do nocc "${container}" files_external:scan "${id}" | grep Error - # shellcheck disable=SC2181 - if [[ ${?} -eq 0 ]]; then - errors="${errors} ${id}" - error_ids="${error_ids} ${id}" - fi + # shellcheck disable=SC2181 + if [[ ${?} -eq 0 ]]; then + errors="${errors} ${id}" + error_ids="${error_ids} ${id}" + fi done done else - echo "Another instance of this script is already running, exiting" - pgrep -a -f "${0}" - exit 0 + echo "Another instance of this script is already running, exiting" + pgrep -a -f "${0}" + exit 0 fi if [[ -n "${errors}" ]]; then - echo "Errors found in the following mounts: ${error_ids}" - exit 1 + echo "Errors found in the following mounts: ${error_ids}" + exit 1 fi echo "No errors found" exit 0