daemonize

Run a command (that does not daemonize itself) as a Unix daemon. More information: <http://software.clapper.org/daemonize/>.

Install

All systems
curl cmd.cat/daemonize.sh
Debian Debian
apt-get install daemonize
Ubuntu
apt-get install daemonize
image/svg+xml Kali Linux
apt-get install daemonize
Fedora
dnf install daemonize
Windows (WSL2)
sudo apt-get update sudo apt-get install daemonize
OS X
brew install daemonize
Raspbian
apt-get install daemonize

Run a command (that does not daemonize itself) as a Unix daemon. More information: <http://software.clapper.org/daemonize/>.

  • 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

© tl;dr; authors and contributors