Background:I'm a Ubuntu/Debian fan and most of my development experience has been on that platform but my current employer uses Redhat. I needed to write a simple init.d script and want the resulting program to run as an unprivileged user. Most resources I found suggest using the daemon function in lieu of start-stop-daemon.Question:Why doesn't the daemon function have an option to set the group like the start-stop-daemon? I'm sure there must be a reason for this, just not sure what that reason is.
Why does Redhat's daemon function not have a group setting?
rhel;init script;daemon
You can certainly change the daemon function to set the group or you can write your own mydaemon function to do it.Or in a simplest possible way just call the runuser command that daemon() uses to start your program with particular UID and GID