add multi stage build to netdisco-base

This commit is contained in:
Oliver Gorwits
2018-01-13 20:06:04 +00:00
parent ec2b2bcfa2
commit 2dbb9df735
3 changed files with 66 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/bash
echo $WAIT_COMMAND
echo $WAIT_START_CMD
is_ready() {
eval "$WAIT_COMMAND"
}
# wait until is ready
i=0
while ! is_ready; do
i=`expr $i + 1`
if [ $i -ge $WAIT_LOOPS ]; then
echo "$(date) - still not ready, giving up"
exit 1
fi
echo "$(date) - waiting to be ready"
sleep $WAIT_SLEEP
done
#start the script
exec $WAIT_START_CMD