mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +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
|
||||
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
|
||||
|
||||
if [ -n "$PUBLISH_AS" ]; then
|
||||
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}')"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue