3.7. Programs

  1. In master-worker mode, it is possible to launch external binaries with the
  2. master, these processes are called programs. These programs are launched and
  3. managed the same way as the workers.
  4.  
  5. During a reload of HAProxy, those processes are dealing with the same
  6. sequence as a worker:
  7.  
  8. - the master is re-executed
  9. - the master sends a SIGUSR1 signal to the program
  10. - if "option start-on-reload" is not disabled, the master launches a new
  11. instance of the program
  12.  
  13. During a stop, or restart, a SIGTERM is sent to the programs.

program

  1. This is a new program section, this section will create an instance <name>
  2. which is visible in "show proc" on the master CLI. (See "9.4. Master CLI" in
  3. the management guide).

command [arguments*]

  1. Define the command to start with optional arguments. The command is looked
  2. up in the current PATH if it does not include an absolute path. This is a
  3. mandatory option of the program section. Arguments containing spaces must
  4. be enclosed in quotes or double quotes or be prefixed by a backslash.

option start-on-reload

no option start-on-reload

  1. Start (or not) a new instance of the program upon a reload of the master.
  2. The default is to start a new instance. This option may only be used in a
  3. program section.