From 2fa673a3a06aebad12c271a442440a66cb9670dd Mon Sep 17 00:00:00 2001 From: Jari Hodju Date: Fri, 18 Aug 2023 12:33:56 +0300 Subject: [PATCH] Fix ps flagging in entrypoint --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 414ccd84..bcde88b1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,7 @@ _term() { # FILL UP PROCESS SEARCH PATTERN HERE TO FIND PROPER PROCESS FOR SIGINT: pattern="fcu_to_garmin_static_transform_publisher" - pid_value="$(ps -ax | grep $pattern | grep -v grep | awk '{ print $1 }')" + pid_value="$(ps -a | grep $pattern | grep -v grep | awk '{ print $1 }')" if [ "$pid_value" != "" ]; then pid=$pid_value echo "Send SIGINT to pid $pid" @@ -16,7 +16,7 @@ _term() { pattern="fcu_to_rplidar_static_transform_publisher" - pid_value="$(ps -ax | grep $pattern | grep -v grep | awk '{ print $1 }')" + pid_value="$(ps -a | grep $pattern | grep -v grep | awk '{ print $1 }')" if [ "$pid_value" != "" ]; then pid=$pid_value echo "Send SIGINT to pid $pid" @@ -28,7 +28,7 @@ _term() { pattern="rplidar_ros2/rplidar" - pid_value="$(ps -ax | grep $pattern | grep -v grep | awk '{ print $1 }')" + pid_value="$(ps -a | grep $pattern | grep -v grep | awk '{ print $1 }')" if [ "$pid_value" != "" ]; then pid=$pid_value echo "Send SIGINT to pid $pid"