I have Debian Lenny box, where I plan to extensively use start-stop-daemon
. The trouble is, the standard Debian start-stop-daemon
doesn't support output redirection: --stdout
and --stderr
keys, which I want to use to log daemons activity.
Should I just update start-stop-daemon
from sources? I tried apt-get
update process, the version still lacks features. Will it break something in Debian? Or should I compile new start-stop-daemon
to some new directory and use it for my daemons, leaving standard Debian package in place?
I don't want to write .sh
wrapper scripts to each daemon, as there will be many of them.
Normally I'd suggest backporting the version you want to lenny from unstable.; just grab all the sources from the unstable tree for that package... but, oof, it's in the dpkg package, which is probably more than you want to bite off.
So yes, compile it yourself and put it in /usr/local/bin/ and you should be good to go.
The man-page for start-stop-deamon does provide a clue on how to redirect stdout/stderr, albeit in a cryptic fashion:
Thus, the following syntax would allow you to use start-stop-daemon with redirection of stdout/stderr
Did you think to write a .sh wrapper for start-stop-deamon instead?
You could rename original start-stop-deamon executable and create your .sh wrapper with "start-stop-deamon" name.