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?

user35042
  • 2,601
  • 10
  • 32
  • 57

1 Answers1

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
quanta
  • 50,327
  • 19
  • 152
  • 213