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 <charles.short@windriver.com>
Change-Id: I970c2600475e32f2c5fb815738a2fe79f99a5b17
(cherry picked from commit 4958c7be50)
This commit is contained in:
Charles Short 2021-04-20 14:32:19 -04:00 committed by Chuck Short
parent 2ca9238894
commit 6f4cb036f3
1 changed files with 2 additions and 2 deletions

View File

@ -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