From 01f68eb87f2c2f6d24f60d0f4e724b009f58d7d6 Mon Sep 17 00:00:00 2001 From: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Date: Wed, 24 Aug 2022 05:27:11 +0000 Subject: [PATCH] daemon: add page (#8390) * daemon: add page * daemon: add delay example * Update pages/linux/daemon.md Co-authored-by: Axel Navarro * Update pages/linux/daemon.md * Update pages/linux/daemon.md Co-authored-by: Axel Navarro --- pages/linux/daemon.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 pages/linux/daemon.md 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`