3

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

2 Answers 2

3

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.

1
  • 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, 2012 at 12:01
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .