From dbf734ac8a5150f8be74125ba8d02567929a1e6f Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 29 Feb 2024 10:03:15 -0600 Subject: [PATCH] Refactor service name extraction in casaos-healthcheck run.sh --- casaos-healthcheck/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casaos-healthcheck/run.sh b/casaos-healthcheck/run.sh index c28504b..8bc11dd 100644 --- a/casaos-healthcheck/run.sh +++ b/casaos-healthcheck/run.sh @@ -58,7 +58,7 @@ else fi # Get a list of all casaos services -SERVICES=$(systemctl list-units --type=service | grep "$SERVICE_PREFIX" | awk '{print $1}' | grep -v '[^ -~]') +SERVICES=$(systemctl list-units --type=service | grep "$SERVICE_PREFIX" | sed 's/^[[:space:]]*●[[:space:]]*//' | grep -oP '\S+\.service') # Check if any services were found if [[ -z "$SERVICES" ]]; then