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

How do I know if a LSB script fails to load or where do I check the log of the lsbs scripts?

I added two scripts with the following command:

update-rc.d scriptname defaults

And just one launches the things I need. It does not seem to be a script error since if I launch it with /etc/init.d/scriptname it works.

This is my script:

#!/bin/bash

### BEGIN INIT INFO
# Provides:          nodes
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts all node apps
# Description:       Starts all node apps like AAM, AMT,...
### END INIT INFO

echo "Launch Node applications with forever"
export PATH=/usr/local/bin:$PATH

# Starts the redis server
redis-server

# Starts AAM
forever -o /var/log/AAM.log -e /var/log/AAM.log --spinSleepTime 2000 -m 5 start /var/nodejs/AAM/app.js
share|improve this question

1 Answer 1

up vote 2 down vote accepted
  1. You will see when it boots on the screen.
  2. Look in /varlog/sysylog or /var/log/messages
  3. You can redirect your application output to a log file (you need to modify the script)

    forever -o /var/log/AAM.log -e /var/log/AAM.log --spinSleepTime 2000 -m 5 start /var/nodejs/AAM/app.js > /var/log/AAM_start.log 2>&1

share|improve this answer
    
I can not see what happens on boot since I log in using ssh.. nothing is logged on either of them (var/log/messages + syslog). Anyway it worked by adding the log, thanks ^^ –  ianaz Nov 28 '12 at 11:16
    
I'm glad it worked :) –  Sacx Nov 28 '12 at 11:17

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.