From b6bbf99bea2de28bc71e02bce3d63bea33591c40 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 9 Aug 2023 01:43:26 +0200 Subject: [PATCH] check_service.sh: Fix error in determin 'check_string_ps'. --- check_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_service.sh b/check_service.sh index 3825746..ed483d1 100755 --- a/check_service.sh +++ b/check_service.sh @@ -150,7 +150,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then _systemd_service_file="/lib/systemd/system/$SYSTEMD_SERVICE" fi if [[ -n "$_systemd_service_file" ]]; then - check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))" + check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "^\s*ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))" fi else check_string_ps="$(trim $(cat "$SYSV_INIT_SCRIPT" | grep DAEMON | grep -o -E "DAEMON\s*=\s*[^[:space:]]+" | cut -d "=" -f2))"