Merge pull request #3 from crhg/command-argument

use 'exec "$@"'
This commit is contained in:
Marko Klemetti 2017-09-28 13:20:49 +03:00 committed by GitHub
commit a93091b798

View File

@ -20,14 +20,13 @@ USAGE
}
wait_for() {
command="$*"
for i in `seq $TIMEOUT` ; do
nc -z "$HOST" "$PORT" > /dev/null 2>&1
result=$?
if [ $result -eq 0 ] ; then
if [ -n "$command" ] ; then
exec $command
if [ $# -gt 0 ] ; then
exec "$@"
fi
exit 0
fi