5.2. Action Hooks

The $cartridge_name/template/.openshift/action_hooks/ directory contains examples of application developer action hooks that run during the cartridge life cycle.

Example 5.3. Action Hooks

pre_start_`cartridge name`
post_start_`cartridge name`
pre_stop_`cartridge name`
OpenShift Enterprise runs default action_hooks as indicated in the control script. To add additional hooks, run them explicitly in the control script. Ensure appropriate documentation is available for application developers to use the additional hooks correctly.
If you find that action hooks are not working, they may not be executable. To fix this, run the following command:
$ git update-index --chmod=+x .openshift/action_hooks/file_name
The --chmod=(+/-)x command sets the execute permissions on the updated file specified.