Skip to content

Commit

Permalink
Fix ps flagging in entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jari-hodju committed Aug 18, 2023
1 parent 920b52c commit e16669a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit e16669a

Please sign in to comment.