#!/bin/bash

# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License;
# you may not use this file except in compliance with the Elastic License.

source /usr/share/elasticsearch/elasticsearch-env

source /usr/share/elasticsearch/x-pack-env

CLI_JAR=$(ls $ES_HOME/bin/elasticsearch-sql-cli-*.jar)

exec \
  "$JAVA" \
  -jar "$CLI_JAR" \
  "$@"
