From 6798b30a169d1033968d5d86dd3f6771bffbb3fc Mon Sep 17 00:00:00 2001 From: tomleb Date: Sat, 6 May 2017 19:17:13 -0400 Subject: [PATCH] Waiting only for postgres backend --- deploy/init.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/init.sh b/deploy/init.sh index 037b7835..cec8069c 100755 --- a/deploy/init.sh +++ b/deploy/init.sh @@ -1,9 +1,13 @@ #!/bin/bash -set -ex +set -eux # TODO Doesn't scale, find another way to wait until db is ready -sleep 40 +if [[ "${PANTSU_DBTYPE}" = "postgres" ]]; then + echo 'Waiting for the database to be ready...' + sleep 40 +fi + go get github.com/ewhal/nyaa go generate ./... go build