[ubuntu-uk] Redirecting output from command executed by start-stop-daemon?

Pete Ryland pdr at pdr.cx
Fri Jun 17 16:08:17 CDT 2005

On Fri, Jun 17, 2005 at 05:35:05 +0100, David Marsh wrote:
> I have a program which I want to start automatically every time the
> computer boots up, and I'd like to redirect the output of that command
> to a logfile.
> So, in the crontab for the appropriate user, I have the following:
> @reboot         /sbin/start-stop-daemon --start --chdir /home/boinc/boinc 
> --background --exec /home/boinc/boinc/boinc>/home/boinc/log/boinc.log
> Does anybody know how I can get boinc's output to be redirected?

An easy -- and if you want to use start-stop-daemon perhaps the only -- way
around it is to create a small script containing:

| #!/bin/sh
| exec /home/boinc/boinc/boinc > /home/boinc/log/boinc.log

and then use that script as the argument to start-stop-daemon.

Perhaps the real question however is whether it is really necessary to use
start-stop-daemon in the first place?


More information about the ubuntu-uk mailing list