fix fulcrum status output

This commit is contained in:
openoms 2025-01-31 11:37:02 +02:00
parent 61766d8bea
commit 1c2e612b78
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65

View File

@ -30,11 +30,10 @@ fi
if [ "$1" = "status-sync" ] || [ "$1" = "status" ]; then
# Check if the command was successful or if it failed with "Connection refused"
if ! echo "$getInfoOutput" | jq -r '.version' 2>/dev/null; then
# Command failed, make getInfo empty
versionExtracted=$(echo "$getInfoOutput" | jq -r '.version' 2>/dev/null)
if [ -z "$versionExtracted" ] || [ "$versionExtracted" = "null" ]; then
getInfo=""
else
# Command succeeded, store the output in getInfo
getInfo="$getInfoOutput"
fi
if systemctl is-active fulcrum >/dev/null; then