mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-07-24 22:33:37 -04:00
Refactor service name extraction in casaos-healthcheck run.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user