mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
26 lines
518 B
Plaintext
26 lines
518 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
set -x
|
||
|
|
||
|
if [ ! -e /conf/elasticsearch.* ]; then
|
||
|
cp $ES_HOME/config/elasticsearch.yml /conf
|
||
|
fi
|
||
|
|
||
|
if [ ! -e /conf/logging.* ]; then
|
||
|
cp $ES_HOME/config/logging.yml /conf
|
||
|
fi
|
||
|
|
||
|
OPTS="-Des.path.conf=/conf -Des.path.data=/data"
|
||
|
|
||
|
if [ -n "$CLUSTER" ]; then
|
||
|
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
|
||
|
fi
|
||
|
if [ -n "$NODE_NAME" ]; then
|
||
|
OPTS="$OPTS -Des.node.name=$NODE_NAME"
|
||
|
fi
|
||
|
if [ -n "$UNICAST_HOSTS" ]; then
|
||
|
OPTS="$OPTS -Des.discovery.zen.ping.unicast.hosts=$UNICAST_HOSTS"
|
||
|
fi
|
||
|
|
||
|
$ES_HOME/bin/elasticsearch $OPTS
|