In a remote CentOS VM Geddy application with MonogoDB wrapper is deployed. The application starts and listen to port 80 when below command is executed.
geddy -e production &
The problem in this CLI command is when the SSH connection to VM was disconnected the process automatically gets closed. To make application working SSH needs to be opened always which is not possible. Is there any alternative method to keep it running as background service.
daemon
computer program inUnix
environment: en.wikipedia.org/wiki/Daemon_%28computing%29#Unix-like_systems There are the following options you have: use the OS infrastructure to runservices
. Integrate your project with theservices' infrastructure. For example Ubuntu have the
service` command and you are able to do 'service MYPROG start', 'service MYPROG stop' and etc. The other possibilities arenohup
orGNU screen
(linode.com/docs/networking/ssh/…) – Bartkonohup
orGNU screen
to assure that your application will start when the OS is restarted. – Bartko