From c6141fbd992d340d3901522fb43c1310e8246359 Mon Sep 17 00:00:00 2001 From: Dao Heng Liu Date: Sun, 27 Jun 2021 12:47:49 +0100 Subject: [PATCH] fix broken ps and grep for checking running status --- uclapi/run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uclapi/run.sh b/uclapi/run.sh index 52a0304..8b5af60 100644 --- a/uclapi/run.sh +++ b/uclapi/run.sh @@ -8,9 +8,9 @@ while /bin/true; do fi # Now check each other service - ps aux | grep uclapi | grep -q -v grep + supervisorctl status uclapi | grep -q RUNNING UCLAPI_STATUS=$? - ps aux | grep celery | grep -q -v grep + supervisorctl status celery-uclapi | grep -q RUNNING CELERY_STATUS=$? if [ $UCLAPI_STATUS -ne 0 ]; then @@ -21,6 +21,6 @@ while /bin/true; do echo "Celery exited" supervisorctl restart celery-uclapi fi - + sleep 60 done