From 566516386b56023059d5b6f759bb4d648e88f724 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Thu, 17 Jun 2021 15:23:32 +0800
Subject: [PATCH] patch

---
 dist/obsscheduler | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dist/obsscheduler b/dist/obsscheduler
index 66af2d0..bbbc1c7 100755
--- a/dist/obsscheduler
+++ b/dist/obsscheduler
@@ -52,15 +52,15 @@ case "$1" in
 		done
 	;;
                 stop)
-		if checkproc bs_sched; then
+		if ps aux | grep bs_sched | grep -v grep &> /dev/null ; then
 			for i in $OBS_SCHEDULER_ARCHITECTURES; do
 			 	$obsdir/bs_admin --shutdown-scheduler "$i"
 			done
 			for i in `seq 600`; do
-				checkproc bs_sched || break
+				ps aux | grep bs_sched | grep -v grep &> /dev/null || break
 			        sleep 1
 			done
-			if checkproc bs_sched ; then
+			if ps aux | grep bs_sched | grep -v grep &> /dev/null ; then
 				killall bs_sched
 			fi
 		fi
-- 
2.27.0

