~clint-fewbar/charms/precise/nrpe/trunk

« back to all changes in this revision

Viewing changes to hooks/general-info-relation-changed

  • Committer: Clint Byrum
  • Date: 2012-07-17 23:17:50 UTC
  • Revision ID: clint@ubuntu.com-20120717231750-d58ntip2s140kce2
fixing logic error in general-info

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
3
import os
 
4
import subprocess
4
5
 
5
6
primary_id=os.environ.get('JUJU_REMOTE_UNIT','testing/0').replace('/','-')
6
7
if not os.path.exists('data'):
7
8
        os.mkdir('data')
8
 
        with open('data/primary_id','w') as primid:
9
 
                primid.write(primary_id)
 
9
with open('data/primary_id','w') as primid:
 
10
primid.write(primary_id)
 
11
 
 
12
subprocess.call(['hooks/monitors-relation-changed'])