fix: redis_status - use --all flag + list-unit-files fallback to detect inactive services

main
Anthony 2026-02-28 15:36:28 +08:00
parent 3d8ea81386
commit b9c61347fb
1 changed files with 1 additions and 1 deletions

View File

@ -848,7 +848,7 @@ actions:
- cmd[cp]:
user: root
commands:
- systemctl list-units --type=service | grep -i redis || echo "No Redis service units found"
- RESULT=$(systemctl list-units --type=service --all | grep -i redis); [ -z "$RESULT" ] && RESULT=$(systemctl list-unit-files --type=service | grep -i redis | awk '{print $1, $2}'); echo "${RESULT:-No Redis service found}"
- return:
type: info
message: "${response.out}"