Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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

share|improve this question

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.

share|improve this answer
If you're satisfied with the answer, please mark it as accepted. – dimitern Feb 15 '14 at 17:33

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


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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.