| 1 | = Daemons = |
| 2 | |
| 3 | '''Daemons''' are server programs that normally run continuously. Your project's daemons are described in its [ProjectConfigFile config.xml] file, with elements of the form: |
| 4 | |
| 5 | {{{ |
| 6 | <daemon> |
| 7 | <cmd> feeder -d 3 </cmd> |
| 8 | [ <host>host.domain.name</host> ] |
| 9 | [ <disabled> 0|1 </disabled> ] |
| 10 | [ <output>filename</output> ] |
| 11 | [ <pid_file>filename</pid_file> ] |
| 12 | </daemon> |
| 13 | <daemon> |
| 14 | ... |
| 15 | </daemon> |
| 16 | }}} |
| 17 | |
| 18 | cmd:: |
| 19 | The command used to start the daemon. Must be a program in the project's bin/ directory. |
| 20 | host:: |
| 21 | Specifies the host on which the daemon should run. The default is the project's main host, as specified in config.xml. |
| 22 | disabled:: |
| 23 | If nonzero, ignore this entry |
| 24 | output:: |
| 25 | Name of output file (in the log_HOSTNAME directory). Defaults to the program name followed by '.log'. If you're running multiple instances of a daemon on one host, you must specify this. |
| 26 | pid_file:: |
| 27 | Name of file used to store the process ID (in the pid_HOSTNAME directory). Defaults to the program name followed by '.pid'. If you're running multiple instances of a daemon on one host, you must specify this. |
| 28 | |
| 29 | Daemons are started when you run the [StartTool bin/start] script, and killed (by a SIGHUP signal) when you run [StartTool bin/stop]. |
| 30 | |
| 31 | Typically, this mechanism is used to run [BackendPrograms work handling daemons]. Projects that use trickle-up messages will also need to have a [TrickleMessages trickle-up handler]. |