Renamed health services

This commit is contained in:
2023-11-16 15:32:29 +01:00
parent 04f69aefde
commit d9d6c8060a
47 changed files with 162 additions and 162 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/bash
exit_code=0
for path in $(btrfs filesystem show | awk '/ path /{print $NF}')
do
echo "Checking health for $path..."
result=$(btrfs device stats $path)
echo "$result"
regex='\.(.*)_errs(\s*)[1-9]'
[[ "$result" =~ $regex ]] && echo "Errors found!" && exit_code=1;
done
exit $exit_code