Detach druid service from console?

I was wondering if there is any way to have the druid services detach from the console and essentially “daemonize”. I tried changing log42j.xml to use a rollingfile appender instead of console but I still see messages on stdout and the process does not exit (detach from current console).

has anyone done this?

Druid normally runs in the foreground. I think that’s actually a good thing- it makes it easier to run under a supervisor like runit or daemontools that can manage its lifecycle and run it automatically if something goes wrong. But if you want to run it in the background, I think the best way to do this would be to change log4j2.xml to send all the logs to a file, then run Druid in a wrapper that redirects stdout/stderr to /dev/null and daemonizes. This might be helpful: