5
hostname=$(unit-get private-address)
6
juju-log "input-tcp-relation-joined/changed, setting port: 9999"
7
relation-set port=9999 hostname=$hostname
10
configPath=${basePath}/conf.d
12
echo -e 'input {\n\ttcp {\n\t\tport => 9999\n\t\tcodec => "json"\n\t}\n}' > ${configPath}/input-tcp.conf
14
if [ "$(service logstash-indexer status | grep running)" ]; then
15
service logstash-indexer restart