1

I am running a Debian system and have an init script in /etc/init.d/ that starts a daemon using start-stop-daemon:

start-stop-daemon --start --quiet --pidfile /tmp/myproject.pid --exec /usr/bin/somebin || return 2

If /usr/bin/somebin writes to STDERR, does that output automatically get written to the syslog? Or do I have to do something explicit to get output to STDERR into the syslog?

1

I haven't got a Debian based handy to test, but I remember it doesn't automatically redirect to the syslog. You must manually handle with something like this:

>> /var/log/myproject.log 2>&1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.