From 6979688bcaf2c670e171ce11df04e7b5ed6ff2c2 Mon Sep 17 00:00:00 2001 From: Alistair Young Date: Wed, 7 Aug 2019 12:25:50 -0500 Subject: [PATCH] daemonize: add page (#3228) --- pages/linux/daemonize.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/linux/daemonize.md diff --git a/pages/linux/daemonize.md b/pages/linux/daemonize.md new file mode 100644 index 0000000000..602e962f62 --- /dev/null +++ b/pages/linux/daemonize.md @@ -0,0 +1,20 @@ +# daemonize + +> Run a command (that does not daemonize itself) as a Unix daemon. +> More information: . + +- Run a command as a daemon: + +`daemonize {{command}} {{command_arguments}}` + +- Write the pid to the specified file: + +`daemonize -p {{path/to/pidfile}} {{command}} {{command_arguments}}` + +- Use a lock file to ensure that only one instance runs at a time: + +`daemonize -l {{path/to/lockfile}} {{command}} {{command_arguments}}` + +- Use the specified user account: + +`sudo daemonize -u {{user}} {{command}} {{command_arguments}}`