Skip to content

Commit dc8cd1d

Browse files
committed
realtime: Check if rtapi_app is running using ping
1 parent 57b02a4 commit dc8cd1d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

scripts/realtime.in

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,15 @@ CheckConfig(){
126126
CheckStatus(){
127127
case $RTPREFIX in
128128
uspace)
129-
if [ -z "$($PS -o stat= -o comm= -C rtapi_app | $GREP -v '^Z')" ]; then
130-
echo rtapi_app is not running
131-
return 1
132-
else
129+
if rtapi_app ping; then
133130
echo rtapi_app is running
134131
return 0
132+
elif [ -n "$($PS -o stat= -o comm= -C rtapi_app | $GREP -v '^Z')" ]; then
133+
echo rtapi_app is running but not reachable
134+
return 1
135+
else
136+
echo rtapi_app is not running
137+
return 1
135138
fi
136139
;;
137140
*)

0 commit comments

Comments
 (0)