Comment 5 for bug 956259

Revision history for this message
Marc Cluet (lynxman) wrote :

Hi Patrick,

After reviewing your charm here's a couple more suggestions

In install hook:
znc shouldn't be started from this hook unless you have a very good reason to do so, the install hook needs to be idempotent (as all the other hooks) so make sure that the install hook can be executed as many times as possible without changing the outcoming result.

In start hook:
You should add a start hook that starts znc in a reliable way, checking that another instance doesn't exist before starting a new one and so forth, when you deploy the charm for the first time juju will run the install and then start hook in order

In stop hook:
Same as the start hook, make sure that you kill the process that you started, make sure to clean afterwards if you need to remove pids or other temporary files

In config-change hook:
You should make sure a config-change hook exists so people can change your charm configuration through "juju set", keep in mind that with juju the user shouldn't have to log into the machine to modify the application configuration