#!/bin/sh # Copyright 2017 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -ex export NODE_NAME=$(NODE_NAME:-${HOSTNAME}) export NODE_MASTER=$(NODE_MASTER:-true) export NODE_DATA=$(NODE_DATA:-true) export HTTP_PORT=$(HTTP_PORT:-9200) export TRANSPORT_PORT=$(TRANSPORT_PORT:-9300) export MINIMUM_MASTER_NODES=$(MINIMUM_MASTER_NODES:-2) chown -R elasticsearch:elasticsearch /data ./bin/elasticsearch_logging_discovery >> ./config/elasticsearch.yml exec su elasticsearch -c ./bin/es-docker (CommandList children: [ (C {(set)} {(-ex)}) (C {(export)} {(Lit_VarLike "NODE_NAME=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(${ VSub_Name HOSTNAME)}) spids: [52 58] ) } ) (C {(export)} {(Lit_VarLike "NODE_MASTER=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(true)}) spids: [63 67] ) } ) (C {(export)} {(Lit_VarLike "NODE_DATA=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(true)}) spids: [72 76] ) } ) (C {(export)} {(Lit_VarLike "HTTP_PORT=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(9200)}) spids: [81 85] ) } ) (C {(export)} {(Lit_VarLike "TRANSPORT_PORT=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(9300)}) spids: [90 94] ) } ) (C {(export)} {(Lit_VarLike "MINIMUM_MASTER_NODES=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(2)}) spids: [99 103] ) } ) (C {(chown)} {(-R)} {(elasticsearch) (Lit_Other ":") (elasticsearch)} {(/data)}) (SimpleCommand words: [{(./bin/elasticsearch_logging_discovery)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(./config/elasticsearch.yml)} spids:[119]) ] ) (C {(exec)} {(su)} {(elasticsearch)} {(-c)} {(./bin/es-docker)}) ] )