Linux: Run a process as daemon in background from SSH

When a process supports daemon mode, you can either run it in a screen instance or init.d script.

If you had to kill off a rogue daemon and need to start it again via SSH, you can restart the daemon with a very simple addition to the command:

For example you have /bin/daemon_process with the parameters "--daemon --log-path=~/logs/blah/"

You can execute it with:

/bin/daemon_process --daemon --log-path=~/logs/blah &

The extra & at the end makes it spit output to the current terminal, but it wont wait for the daemon to finish.

Source

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog