Skip to content

Commit 069d3ae

Browse files
committed
[bug/gh-71] made pinging host and port configurable
1 parent 7fc5026 commit 069d3ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

edrop-cron.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ DJANGODIR=/edrop # Django project directory
55
NUM_WORKERS=3 # Number of Gunicorn workers
66
DJANGO_SETTINGS_MODULE=edrop.settings # Django settings module
77
DJANGO_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
810

911
echo "Starting $NAME as `whoami`"
1012

@@ -15,7 +17,7 @@ export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
1517
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
1618
mkdir -p /edrop/logs
1719

18-
while ! nc -z 127.0.0.1 8000; do echo "eDrop not responding"; sleep 5; done
20+
while ! nc -z $URL $PORT; do echo "eDrop not responding"; sleep 5; done
1921
echo "eDrop has started successfully"
2022

2123
# start the cron job

0 commit comments

Comments
 (0)