From cadee26dba433ec1ef6153329acb5fcac1af9fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 22 Feb 2025 13:48:55 +0100 Subject: [PATCH] Improve dig error handlin in api.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/api.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/advanced/Scripts/api.sh b/advanced/Scripts/api.sh index c9c2dd49..b8c7fe99 100755 --- a/advanced/Scripts/api.sh +++ b/advanced/Scripts/api.sh @@ -34,6 +34,12 @@ TestAPIAvailability() { exit 1 fi + # If an error occurred, the variable starts with ;; + if [ "${chaos_api_list#;;}" != "${chaos_api_list}" ]; then + echo "Communication error. Is FTL running?" + exit 1 + fi + # Iterate over space-separated list of URLs while [ -n "${chaos_api_list}" ]; do # Get the first URL