Skip to content

Initialization script skips database wait when port is omitted from database host setting #42

@vedmaka

Description

@vedmaka

/wait-for-it.sh -t 86400 "$WG_DB_SERVER"

The wait-for-it.sh requires host:port syntax for the host param. With $wgDbServer set to just hostname, i.e. db, this results in the tool call as follows:

/wait-for-it.sh -t 86400 "db"

And this makes the script exit with syntax error:

Unknown argument: db
Usage:
    wait-for-it.sh host:port [-s] [-t timeout] [-- command args]
    -h HOST | --host=HOST       Host or IP under test
    -p PORT | --port=PORT       TCP port under test
                                Alternatively, you specify the host and port as host:port
    -s | --strict               Only execute subcommand if the test succeeds
    -q | --quiet                Don't output any status messages
    -t TIMEOUT | --timeout=TIMEOUT
                                Timeout in seconds, zero for no timeout
    -- COMMAND ARGS             Execute command with args after the test finishes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions