Upstart recipe for non-forking daemons
Do you need to start your non-forking daemon on Ubuntu Server 15.04? You can use this recipe.
I know that probably systemd will be the default init system even in Ubuntu Server 15.04 but, in the mean time, we have Ubuntu Server 14.04.2 and on that OS the init system is Upstart.
It turns out that Upstart has an introduction here. It is well written and understandable.
If your daemon daemon:
- don’t fork;
- can simply been stopped by a SIGSTOP
- logs to the console;
you can write a job description like the following one. It has to be placed in /etc/init/[yourname.conf].
Than you can use the following commands:
The output of your daemon will be in /var/log/upstart/[jobname]. Isn’t that sweet?