<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hello, I’m having some trouble trying to log the stdout and the
stderror generated by an application when it is started by an init.d
script.</DIV>
<DIV> </DIV>
<DIV>What im trying to run is something like this:</DIV>
<DIV> </DIV>
<DIV>$logFile=/var/log/test.log</DIV>
<DIV> </DIV>
<DIV>if [ ! "$logFile" == "" ]; then</DIV>
<DIV>
touch $logFile || exit 2</DIV>
<DIV>
start-stop-daemon --start --make-pidfile --pidfile $PIDFILE --exec
$DAEMON -- $DAEMON_ARGS >> $logFile 2>&1 &</DIV>
<DIV>else ....</DIV>
<DIV> </DIV>
<DIV>when I try to run the script from bash it works perfectly, but when it runs
after a reboot, the log file isn’t generated. I’m suspecting it could be a
matter of mounting the file system after starting my script, but I’ve checked
the execution number and its the last one it shares the number with some other
processes). Anyone can guess what’s wrong with the
code?</DIV></DIV></DIV></BODY></HTML>