use env var for startup script

This commit is contained in:
2022-06-07 12:41:20 +02:00
parent 35ba25ba9e
commit a257d2cefb
4 changed files with 14 additions and 6 deletions

View File

@@ -1,10 +1,12 @@
#!/bin/ash
#!/bin/sh
echo "Waiting for memcached"
while ! nc -z -w 1 memcached 11211; do
HOST=$(echo $MEMCACHE | cut -d: -f1)
PORT=$(echo $MEMCACHE | cut -d: -f2)
echo "Waiting for memcached at $HOST:$PORT"
while ! nc -z -w 1 $HOST $PORT; do
sleep 1
echo "..."
echo "retrying..."
done
echo "Starting server"