From 4958c7be50f7af240231151d6545fc8e83141306 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Tue, 20 Apr 2021 14:32:19 -0400 Subject: [PATCH] py3: Check for running python3 process Centos 8 uses python3 by default so check for running python3 process as well. Story: 2008454 Task: 42370 Signed-off-by: Charles Short Change-Id: I970c2600475e32f2c5fb815738a2fe79f99a5b17 --- fm-rest-api/fm/scripts/fm-api | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fm-rest-api/fm/scripts/fm-api b/fm-rest-api/fm/scripts/fm-api index 0988fc6e..bf685411 100644 --- a/fm-rest-api/fm/scripts/fm-api +++ b/fm-rest-api/fm/scripts/fm-api @@ -42,7 +42,7 @@ status() # Status function has a standard set of return codes to indicate daemon status # http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html - local my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${DAEMON}([^\w-]|$)"` + local my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2|/usr/bin/python3) ${DAEMON}([^\w-]|$)"` if [ -z "${my_processes}" ]; then echo "$NAME is not running" @@ -82,7 +82,7 @@ start () confirm_stop() { - local my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${DAEMON}([^\w-]|$)"` + local my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2|/usr/bin/python3) ${DAEMON}([^\w-]|$)"` if [ -n "${my_processes}" ] then