<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I did have same kind of issue. I started using bash instead of sh.<div>(1st line: #!/bin/bash)</div><div>Maybe it is a dirty bypass and I should use a clean sh script.</div><div>Teco</div><div><br></div><div><br><div><div>Op 27 mrt. 2012, om 17:58 heeft Toni Castelli het volgende geschreven:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div 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></div>
_______________________________________________<br>Voyage-linux mailing list<br><a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br>http://list.voyage.hk/mailman/listinfo/voyage-linux<br></blockquote></div><br></div></body></html>