I had a FreeBSD machine and it had a /usr/sbin/daemon
command which could run my program in the background.
The question is how to do something similar in Ubuntu? I would like something I can put in a startup script.
What I mean is my program can't put itself in a background when starts.
I tried:
start-stop-daemon --start --quiet --pidfile $PIDSPATH/$PIDFILE --exec $DAEMON
But it just starts the program and I must wait for it to finish.