fix: redis_status - use --all flag + list-unit-files fallback to detect inactive services
parent
3d8ea81386
commit
b9c61347fb
|
|
@ -848,7 +848,7 @@ actions:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
user: root
|
user: root
|
||||||
commands:
|
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:
|
- return:
|
||||||
type: info
|
type: info
|
||||||
message: "${response.out}"
|
message: "${response.out}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue