Way of getting logs for startup processes in /etc/init.d

logsservicesstartup

Is there a way of getting logs for startup processes in /etc/init.d?

I am running Raspbian (Debian Wheezy).

dmesg shows boot log, but does not go far enough.

Some time ago I added a script to start tightvncserver and have seen similar scripts posted by others.

This never seems to start, but I am at a loss to find out why. I would like to see if there are any errors generated.

#!/bin/sh
### BEGIN INIT INFO
# Provides:          tightvncserver
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop tightvncserver
### END INIT INFO

# More details see: 
# http://www.penguintutor.com/linux/tightvnc

### Customize this entry
# Set the USER variable to the name of the user to start tightvncserver under
export USER='pi'
### End customization required

eval cd ~$USER

case "$1" in
  start)
    su $USER -c '/usr/bin/tightvncserver :1'
    echo "Starting TightVNC server for $USER "
    ;;
  stop)
    pkill Xtightvnc
    echo "Tightvncserver stopped"
    ;;
  *)
    echo "Usage: /etc/init.d/tightvncserver {start|stop}"
    exit 1
    ;;
esac
exit 0

Best Answer

Try service tightvncserver start (as root) in the running system, it may give you some hints. If not, your best option is using a serial console and logging its output. If that isn't possible, bootlogd may be able to help you out. If you get nothing, maybe you forgot to activate your init script. What's the output of the

$ ls /etc/rc?.d/*tightvncserver

command? If nothing, try (as root)

# update-rc.d tightvncserver defaults
Related Question