#!/bin/sh

# CONF_FILE setting was removed
if [ ! -z "$CONF_FILE" ]; then
    echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
    exit 1
fi

# fails to start without keystore
if [ ! -f "${ES_PATH_CONF}/elasticsearch.keystore" ]; then
    "${ES_HOME}/bin/elasticsearch-keystore" create
fi