daemonize
Run a command (that does not daemonize itself) as a Unix daemon. tldr-pages
On Linux
Linux
Run a command as a daemon
daemonize command command_argumentsIdentifyWrite the PID to the specified file
daemonize -p path/to/pidfile command command_argumentsIdentifyUse a lock file to ensure that only one instance runs at a time
daemonize -l path/to/lockfile command command_argumentsIdentifyUse the specified user account
sudo daemonize -u user command command_argumentsIdentify