~charmers/charms/precise/opentsdb/trunk

« back to all changes in this revision

Viewing changes to hooks/zookeeper-relation-changed

  • Committer: Robert Collins
  • Date: 2012-06-26 03:48:13 UTC
  • Revision ID: robertc@robertcollins.net-20120626034813-huidbycs7baegu0j
Workingish charm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
relation-get
8
8
juju-log Relation members:
9
9
relation-list
 
10
zk_host=`relation-get private-address`
 
11
zk_port=`relation-get port`
 
12
[ -z "$zk_host" ] && exit 0
 
13
cd /opt/opentsdb
 
14
open-port 4242 # web port for talking to tsd
 
15
tsdtmp=${TMPDIR-'/tmp'}/tsd
 
16
start-stop-daemon -b -m -d $(pwd) --start --pidfile /var/run/opentsdb.pid --exec $(pwd)/build/tsdb -- tsd --port=4242 --staticroot=build/staticroot --cachedir="$tsdtmp" --zkquorum=$zk_host:$zk_port