1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-03-06 19:26:13 +00:00

Improve dig error handlin in api.sh (#5965)

This commit is contained in:
Dominik 2025-02-23 20:15:31 +01:00 committed by GitHub
commit 48c4efd7b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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