~mbruzek/charms/precise/bip/tests

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Brad Marshall
  • Date: 2013-07-18 07:00:26 UTC
  • Revision ID: brad.marshall@canonical.com-20130718070026-lb6l9wwbpsw3soh6
Added listen_port option

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
hook_dir = os.path.abspath(os.path.dirname(__file__))
36
36
charm_dir = os.path.dirname(hook_dir)
 
37
 
 
38
listen_port = config().get('listen_port')
37
39
bip_conf = '/etc/bip.conf'
38
40
bip_defaults = '/etc/default/bip'
39
41
 
54
56
@hooks.hook('config-changed')
55
57
def config_changed():
56
58
    service('reload', 'bip')
 
59
        open_port(listen_port)
57
60
 
58
61
 
59
62
@hooks.hook('start')