From 55bb0206cd59abac59fea7ac22cf52a4e90a6f38 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 30 Jun 2016 04:10:38 +0000 Subject: [PATCH] scst: when checking the status of the service, also check if all daemons are running Signed-off-by: Erez Zilber git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6906 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 5e609c26f..c906f32c2 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -298,6 +298,15 @@ scst_status() { return 3 fi done + + for d in $SCST_DAEMONS; do + daemon_name=`basename ${d}` + pgrep ${daemon_name} > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "${daemon_name}: not running" + return 3 + fi + done return 0 }