File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ DJANGODIR=/edrop # Django project directory
55NUM_WORKERS=3 # Number of Gunicorn workers
66DJANGO_SETTINGS_MODULE=edrop.settings # Django settings module
77DJANGO_WSGI_MODULE=edrop.wsgi # WSGI module name
8- URL=127.0.0.1 # URL to ping before starting cron job
9- PORT=8000 # Port to ping before starting cron job
108
119echo " Starting $NAME as ` whoami` "
1210
@@ -17,7 +15,15 @@ export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
1715export PYTHONPATH=$DJANGODIR :$PYTHONPATH
1816mkdir -p /edrop/logs
1917
20- while ! nc -z $URL $PORT ; do echo " eDrop not responding" ; sleep 5; done
18+ while true ; do
19+ sleep 5;
20+ http_response=$( curl -s -o /dev/null -I -w " %{http_code}\n" http://localhost:8000/$APP_ROOT ) ;
21+ if [ $http_response == " 200" ]; then
22+ break
23+ else
24+ echo " eDrop not responding"
25+ fi
26+ done
2127echo " eDrop has started successfully"
2228
2329# start the cron job
You can’t perform that action at this time.
0 commit comments