2025-03-14 21:59:59 -06:00
|
|
|
# daemon
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
> Turns other processes into daemons.
|
|
|
|
|
> More information: <https://manned.org/daemon.1>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a command as a daemon:
|
|
|
|
|
|
|
|
|
|
`daemon --name="{{name}}" {{command}}`
|
|
|
|
|
|
|
|
|
|
- Run a command as a daemon which will restart if the command crashes:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`daemon --name="{{name}}" {{[-r|--respawn]}} {{command}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a command as a daemon which will restart if it crashes, with two attempts every 10 seconds:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`daemon --name="{{name}}" {{[-r|--respawn]}} --attempts=2 --delay=10 {{command}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a command as a daemon, writing logs to a specific file:
|
|
|
|
|
|
|
|
|
|
`daemon --name="{{name}}" --errlog={{path/to/file.log}} {{command}}`
|
|
|
|
|
|
|
|
|
|
- Kill a daemon (SIGTERM):
|
|
|
|
|
|
|
|
|
|
`daemon --name="{{name}}" --stop`
|
|
|
|
|
|
|
|
|
|
- List daemons:
|
|
|
|
|
|
|
|
|
|
`daemon --list`
|