check_service.sh: Fix error in determin 'check_string_ps'.
This commit is contained in:
parent
d2c6bf3e48
commit
b6bbf99bea
@ -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))"
|
||||
|
Loading…
Reference in New Issue
Block a user