diff --git a/pages/linux/daemon.md b/pages/linux/daemon.md new file mode 100755 index 0000000000..8f5ad57ff0 --- /dev/null +++ b/pages/linux/daemon.md @@ -0,0 +1,28 @@ +# daemon + +> Run processes into daemons. +> More information: . + +- Run a command as a daemon: + +`daemon --name="{{name}}" {{command}}` + +- Run a command as a daemon which will restart if the command crashes: + +`daemon --name="{{name}}" --respawn {{command}}` + +- Run a command as a daemon which will restart if it crashes, with two attempts every 10 seconds: + +`daemon --name="{{name}}" --respawn --attempts=2 --delay=10 {{command}}` + +- 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`