more flexible interface to daemonise