~zirpu/charms/precise/haproxy/fix-stop-hook

« back to all changes in this revision

Viewing changes to formulas/haproxy/hooks/website-relation-changed

  • Committer: Clint Byrum
  • Date: 2011-03-15 23:11:42 UTC
  • Revision ID: clint@ubuntu.com-20110315231142-iu67h0qtgy01t2bz
- Finishing website/http with copy/pasted hooks: WINNING
- Updated wordpress description to match Ubuntu package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
case "$ENSEMBLE_CHANGE" in
 
4
joined|modified)
 
5
 
 
6
  IP=`ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n 1`
 
7
 
 
8
  echo setting ip to $IP
 
9
 
 
10
  relation-set ip=$IP port=80 hostname=`hostname -s`
 
11
  ;;
 
12
departed)
 
13
  ;;
 
14
*)
 
15
  echo unexpected change type $ENSEMBLE_CHANGE
 
16
  exit 1
 
17
esac