Skip to content

Commit

Permalink
Merge pull request #24 from Fokko/fix-fixed-the-entry-script
Browse files Browse the repository at this point in the history
Only use the first argument
  • Loading branch information
puckel committed Jun 2, 2016
2 parents 5885476 + 3ea4491 commit e93d6ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FERNET_KEY=$(python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fer
sed -i "s/{FERNET_KEY}/${FERNET_KEY}/" $AIRFLOW_HOME/airflow.cfg

# wait for rabbitmq
if [ "$@" = "webserver" ] || [ "$@" = "worker" ] || [ "$@" = "scheduler" ] || [ "$@" = "flower" ] ; then
if [ "$1" = "webserver" ] || [ "$1" = "worker" ] || [ "$1" = "scheduler" ] || [ "$1" = "flower" ] ; then
j=0
while ! curl -sI -u $RABBITMQ_CREDS http://$RABBITMQ_HOST:15672/api/whoami |grep '200 OK'; do
j=`expr $j + 1`
Expand All @@ -26,7 +26,7 @@ if [ "$@" = "webserver" ] || [ "$@" = "worker" ] || [ "$@" = "scheduler" ] || [
fi

# wait for DB
if [ "$@" = "webserver" ] || [ "$@" = "worker" ] || [ "$@" = "scheduler" ] ; then
if [ "$1" = "webserver" ] || [ "$1" = "worker" ] || [ "$1" = "scheduler" ] ; then
i=0
while ! nc $MYSQL_HOST $MYSQL_PORT >/dev/null 2>&1 < /dev/null; do
i=`expr $i + 1`
Expand All @@ -37,7 +37,7 @@ if [ "$@" = "webserver" ] || [ "$@" = "worker" ] || [ "$@" = "scheduler" ] ; the
echo "$(date) - waiting for ${MYSQL_HOST}:${MYSQL_PORT}... $i/$TRY_LOOP"
sleep 5
done
if [ "$@" = "webserver" ]; then
if [ "$1" = "webserver" ]; then
echo "Initialize database..."
$CMD initdb
fi
Expand Down

0 comments on commit e93d6ed

Please sign in to comment.