<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Toni:<div><br></div><div>    Between Voyage 0.6.5 (Lenny) and Voyage 0.7.5 (Squeeze) Debian changed the default sh from bash to dash, and at the time it did indeed cause one of the /bin/sh Voyage scripts to break for me (dash was broken somehow with regard to quoting, don't remember if stdout was a casualty).  I ended up explicitly using /bin/bash in my reworked version of the script and never had a problem again.</div><div><br></div><div>    Try both #!/bin/dash and #!/bin/bash explicitly in your script and report back what you find along with your Voyage version, please.<br><div><br></div><div>--Frank<br><br>--- On <b>Tue, 3/27/12, Teco Boot <i><teco@inf-net.nl></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Teco Boot <teco@inf-net.nl><br>Subject:
 Re: [Voyage-linux] log the stdout of a process started by start-stop-daemon<br>To: "Toni Castelli" <acastelli@keonn.com><br>Cc: voyage-linux@voyage.hk<br>Date: Tuesday, March 27, 2012, 11:39 PM<br><br><div id="yiv787174926"><div>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="yiv787174926Apple-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 rel="nofollow" ymailto="mailto:Voyage-linux@list.voyage.hk" target="_blank" href="/mc/compose?to=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></div></div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Voyage-linux mailing list<br><a ymailto="mailto:Voyage-linux@list.voyage.hk" href="/mc/compose?to=Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br><a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/listinfo/voyage-linux</a><br></div></blockquote></div></div></td></tr></table>