Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken ps and grep for checking running status #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions uclapi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +21,6 @@ while /bin/true; do
echo "Celery exited"
supervisorctl restart celery-uclapi
fi

sleep 60
done