working
This commit is contained in:
1 parent
de583713da
commit
eeabd35f8d
3 files changed
+27
-2
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# checkFilestoreAll — check the filestore of every active container.
|
||||
# Runs checkFilestore for each UUID returned by activeContainers.
|
||||
# Output: "<UUID> OK" or "<UUID> NOK" per container.
|
||||
|
||||
SBIN_DIR="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
|
||||
|
||||
active_uuids() {
|
||||
"$SBIN_DIR/activeContainers" | awk 'NF && $1 != "uuid" && $1 !~ /^-/ {print $1}'
|
||||
}
|
||||
|
||||
failed=0
|
||||
while read -r UUID; do
|
||||
[[ -n "$UUID" ]] || continue
|
||||
if "$SBIN_DIR/checkFilestore" "$UUID" >/dev/null 2>&1; then
|
||||
echo "$UUID OK"
|
||||
else
|
||||
echo "$UUID NOK"
|
||||
failed=1
|
||||
fi
|
||||
done < <(active_uuids)
|
||||
|
||||
exit "$failed"
|
||||
Reference in new issue
Block a user