summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-03-13 20:50:45 +0100
committerFlorian Dold <florian@dold.me>2024-03-13 20:50:45 +0100
commitd89a7daf31d5d25bae7600c38479858e45eed1c1 (patch)
tree419c6e11a2c4a59aae2273fd73316abb818a10e2
parentdae577f7c9e9534fe9b458dfa29ae0708d691482 (diff)
downloaddeployment-d89a7daf31d5d25bae7600c38479858e45eed1c1.tar.gz
deployment-d89a7daf31d5d25bae7600c38479858e45eed1c1.tar.bz2
deployment-d89a7daf31d5d25bae7600c38479858e45eed1c1.zip
sync
-rwxr-xr-xregional-currency/diagnose.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/regional-currency/diagnose.sh b/regional-currency/diagnose.sh
index 6ec2ef5..b289151 100755
--- a/regional-currency/diagnose.sh
+++ b/regional-currency/diagnose.sh
@@ -108,7 +108,15 @@ taler-merchant-httpd.service
all_units=()
all_units+=( "${libeufin_units[@]}" "${exchange_units[@]}" "${merchant_units[@]}" )
-for unit in $all_units[@]; do
+for unit in ${all_units[@]}; do
expect_unit_active "$unit"
done
+for unit in ${all_units[@]}; do
+ num_warnings=$(systemctl -u "$unit" | grep WARNING | wc -l)
+ num_errors=$(systemctl -u "$unit" | grep ERROR | wc -l)
+ if [[ ( $num_errors -eq 0 ) && ( $num_warnings -eq 0 ) ]]; then
+ continue
+ fi
+ echo "Please check logs for $unit ($num_warnings warnings, $num_errors errors)"
+done