I am using an init script to run a simple process, which is started with:
start-stop-daemon --start --quiet --chuid $DAEMONUSER \
--make-pidfile --pidfile $PIDFILE --background \
--exec $DAEMON $DAEMON_ARGS
The process called $DAEMON usually prints log information to its standard output. As far as I can tell this data is not being stored anywhere.
I would like to write or append the stdout of $DAEMON to a file somewhere.
The only solution I know is to tell start-stop-daemon to call a shellscript instead of $DAEMON directly; the script then calls $DAEMON and writes to the logfile. But that requires an extra script which, like modifying the daemon itself, seems the wrong way to solve such a common task.