1

I want to call the relation-changed hook whenever there is a config-change and config-change hook is called. Can i directly call relation-changed from config-change hook. My config-change hook is written in bash.

config-change:
#!/bin/bash
...
relation-changed

Is it the right way to call it. Appreciate your response. Thanks in advance.

2 Answers 2

2

You can but I would recommend putting any shared code in a shared utils script and then call that from both your relation-changed hook and your config-change hook.

1
  • If you're satisfied with the answer, please mark it as accepted.
    – dimitern
    Feb 15, 2014 at 17:33
0

Assuming your relation is called foo, you should always be able to call:

$CHARM_DIR/hooks/foo-relation-changed

...but hatch's suggestion that you write library code, and use that directly, is a good one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .