~james-page/charms/oneiric/jenkins/trunk

« back to all changes in this revision

Viewing changes to hooks/master-relation-joined

  • Committer: James Page
  • Date: 2011-06-30 15:12:58 UTC
  • Revision ID: james.page@canonical.com-20110630151258-agu2b5j65cabbhwl
Updates + license file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
# get default route
3
 
dev=`netstat -nr | grep '^0.0.0.0' | awk '{ print $8 }'`
4
 
# Get it's ip address
5
 
ip=`ifconfig $dev | grep 'inet addr' | awk -F: '{ print $2 '} | awk '{ print $1 '}`
6
 
 
7
 
relation-set url="http://$ip:8080"
8
 
 
 
2
 
 
3
echo "Setting url relation to http://`hostname -f`:8080"
 
4
relation-set url="http://`hostname -f`:8080"