13.4.2. Cartridge Action Hooks
Cartridge action hooks are used by creating a file in the
App_Name/.openshift/action_hooks
directory with the same name as the desired event.
Use the following list for a reference to all possible action hooks associated with a cartridge control action.
Action | Description | Event-specific examples |
---|---|---|
Start | Start the software the cartridge controls. | pre_start_Cart_Name, post_start_Cart_Name |
Stop | Stop the software the cartridge controls. | pre_stop_Cart_Name, post_stop_Cart_Name |
Reload | The cartridge and the package software will re-read the configuration information. | pre_reload_Cart_Name, post_reload_Cart_Name |
Restart | Current cartridge process is stopped and started again. | pre_restart_Cart_Name, post_restart_Cart_Name |
Tidy | All unused resources are released. | pre_tidy_Cart_Name, post_tidy_Cart_Name |
Cart_Name is a replaceable term used to represent the cartridge short-name. For example, for a JBossAS cartridge to be implemented during the pre-start process, create the file
App_Name/.openshift/action_hooks/pre_start_jbossas
, edit it and add the desired information.