From eb462eb3a3f44707bbcea878a99408bed0297438 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Tue, 18 Jun 2024 21:33:38 +1000 Subject: [PATCH] fix: update check script to use pgrep --- site/profiles/templates/proxmox/check_ceph_service.sh.erb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/site/profiles/templates/proxmox/check_ceph_service.sh.erb b/site/profiles/templates/proxmox/check_ceph_service.sh.erb index ecbd6ae..907f514 100644 --- a/site/profiles/templates/proxmox/check_ceph_service.sh.erb +++ b/site/profiles/templates/proxmox/check_ceph_service.sh.erb @@ -3,8 +3,5 @@ if [ $# -eq 0 ]; then echo "No service specified" exit 1 fi -if systemctl is-active --quiet $1; then - exit 0 -else - exit 2 -fi + +pgrep -x ceph-${1} > /dev/null 2>&1 || exit 1