mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-01-06 01:08:42 +00:00
Added support for installing plugins
This commit is contained in:
parent
d590bc62c1
commit
b4be1b37bd
1 changed files with 10 additions and 0 deletions
|
@ -19,15 +19,25 @@ OPTS="-Des.path.conf=/conf \
|
||||||
if [ -n "$CLUSTER" ]; then
|
if [ -n "$CLUSTER" ]; then
|
||||||
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
|
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$NODE_NAME" ]; then
|
if [ -n "$NODE_NAME" ]; then
|
||||||
OPTS="$OPTS -Des.node.name=$NODE_NAME"
|
OPTS="$OPTS -Des.node.name=$NODE_NAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$UNICAST_HOSTS" ]; then
|
if [ -n "$UNICAST_HOSTS" ]; then
|
||||||
OPTS="$OPTS -Des.discovery.zen.ping.unicast.hosts=$UNICAST_HOSTS"
|
OPTS="$OPTS -Des.discovery.zen.ping.unicast.hosts=$UNICAST_HOSTS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$PUBLISH_AS" ]; then
|
if [ -n "$PUBLISH_AS" ]; then
|
||||||
OPTS="$OPTS -Des.transport.publish_host=$(echo $PUBLISH_AS | awk -F: '{print $1}')"
|
OPTS="$OPTS -Des.transport.publish_host=$(echo $PUBLISH_AS | awk -F: '{print $1}')"
|
||||||
OPTS="$OPTS -Des.transport.publish_port=$(echo $PUBLISH_AS | awk -F: '{if ($2) print $2; else print 9300}')"
|
OPTS="$OPTS -Des.transport.publish_port=$(echo $PUBLISH_AS | awk -F: '{if ($2) print $2; else print 9300}')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$PLUGINS" ]; then
|
||||||
|
for p in $(echo $PLUGINS | awk -v RS=, '{print}')
|
||||||
|
do
|
||||||
|
$ES_HOME/bin/plugin --install $p
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
$ES_HOME/bin/elasticsearch $OPTS
|
$ES_HOME/bin/elasticsearch $OPTS
|
||||||
|
|
Loading…
Reference in a new issue