On 12 July 2007, Frank Wilson wrote:
> I'm trying to debug an init script / daemon I'm trying to run. I can't
> seem to print the  debug output to print to a file. For example I
> enter:
>
> /etc/init.d/apache2 restart --debug >> /root/apache2.debug
>
> or
>
> /etc/init.d/apache2 restart --debug > /root/apache2.debug
>
> but I get none of the debug output. Also less insists that
> /root/apache2.debug is a binary file... not sure why.

First of all, you should do something like "/etc/init.d/apache2 
restart --debug > /root/apache2.debug 2>&1" to catch both, standard and error 
output.

Still, this won't work in your case. The output you usually see on screen, is 
*not* generated by the script (or the executing shell) but by the commands 
used in the script.

So keep a backup of the original script, then dive into it with your favourite 
editor and append ">> /root/apache2.debug 2>&1" to all relevant commands.

Uwe

-- 
Jethro Tull: Maybe, I am not done yet!
-- 
[EMAIL PROTECTED] mailing list

Reply via email to