Added support for installing plugins

This commit is contained in:
Geoff Bourne 2014-11-15 20:10:06 +00:00
parent d590bc62c1
commit b4be1b37bd

View file

@ -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