~mars/charms/precise/memcached/fix-cache-relation-joined

« back to all changes in this revision

Viewing changes to hooks/cache-relation-joined

  • Committer: Juan L. Negron
  • Date: 2012-09-14 20:14:21 UTC
  • mfrom: (49.1.1 memcached)
  • Revision ID: juan.negron@canonical.com-20120914201421-inn0xa57xhi2ehi8
Some fixes for things I noticed while reviewing the charm. MP:124280

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
relation-set host=`hostname -f` port=11211
 
2
if [ -z "$JUJU_RELATION_ID" ] ; then
 
3
    rids=$(relation-ids cache)
 
4
else
 
5
    rids=$JUJU_RELATION_ID
 
6
fi
 
7
for $rid in $rids ; do
 
8
    relation-set -r $rid host=`unit-get private-address` port=`config-get tcp-port` udp-port=`config-get udp-port`
 
9
done