#!/bin/sh # Elasticsearch cannot create its keystore in the root-owned config directory. keystore="${ES_HOME}/bin/elasticsearch-keystore" if [ ! -f "${ES_PATH_CONF}/elasticsearch.keystore" ]; then exec "${keystore}" create elif ! "${keystore}" has-passwd --silent; then exec "${keystore}" upgrade fi