It's like wait-for-it.sh, but for Oracle databases.
- Go v1.18 or later
You can pass the information as command-line arguments:
./wait-for-oracle --user=<username> --password=<password> --host=<host> [--port=<port>] --sid=<sid> [--timeout=<timeout>]You can also use environment variables to pass the information:
export ORACLE_USER=<username>
export ORACLE_PASSWORD=<password>
export ORACLE_HOST=<host>
export ORACLE_PORT=<port>
export ORACLE_SID=<sid>
export ORACLE_TIMEOUT=<timeout>
./wait-for-oracle--userorORACLE_USER: Oracle database user--passwordorORACLE_PASSWORD: Oracle database password--hostorORACLE_HOST: Oracle database host--portorORACLE_PORT: Oracle database port (default: 1521)--sidorORACLE_SID: Oracle database SID--timeoutorORACLE_TIMEOUT: Timeout in seconds (default: 0)
If timeout is not specified or is 0, the program will wait indefinitely.
The program will either print "Connected" if the connection to the database is successful and exit with code 0, or "Timeout" if the connection could not be established within the specified timeout (exit code 1).
This program is licensed under the MIT License.