Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

my actual problem is trying to debug a init script to start Resque. It works fine run as root from the command line, but does nothing on boot. It has some proper insserv headers and I've run updaterc.d to create the symlinks, and checked that they exist. The script is +x.

# find /etc/rc*.d -name \*resque\*
/etc/rc0.d/K01resque
/etc/rc1.d/K01resque
/etc/rc2.d/S01resque
/etc/rc3.d/S01resque
/etc/rc4.d/S01resque
/etc/rc5.d/S01resque
/etc/rc6.d/K01resque

# ls -l /etc/init.d/resque 
-rwxr-xr-x 1 root root 2093 Oct 24 03:02 /etc/init.d/resque

the script can be viewed here if you like. It uses lsb functions to log messages, which essentially echo() to STDOUT I believe. So where does the output go during startup? It's not in /var/log/*log

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The output of initscripts are not logged anywhere, any output goes to the console. To log the output of the script add this at the top:

exec 1>/tmp/init.log 2>&1

You may also want to add set -x to see exactly how it's being interpreted.

share|improve this answer
    
works great. although resque still isn't coming up on boot at least I know it's not the init script. thanks! –  sbeam Oct 25 '12 at 12:01

On Debian Wheezy, do

apt-get install bootlogd

On previous versions, it is already installed but you need to enable it in /etc/default/bootlogd.

The output is then logged to /var/log/boot

See https://wiki.debian.org/bootlogd for a few more details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.