Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this init.d script

# Provides:          jboss
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/Stop JBoss AS v7.0.0
#source some script files in order to set and export environmental variables
#as well as add the appropriate executables to $PATH
[ -r /etc/profile.d/ ] && . /etc/profile.d/
[ -r /etc/profile.d/ ] && . /etc/profile.d/

case "$1" in
        echo "Starting JBoss AS 7.0.0"
        #sudo -u jboss sh ${JBOSS_HOME}/bin/

        start-stop-daemon --start --quiet --background --chuid charlie --exec $JBOSS_HOME/bin/
        echo "Stopping JBoss AS 7.0.0"
        #sudo -u jboss sh ${JBOSS_HOME}/bin/ --connect command=:shutdown

        start-stop-daemon --start --quiet --background --chuid charlie --exec $JBOSS_HOME/bin/ -- --connect command=:shutdown
    ${0} stop
    ${0} start
        echo "Usage: /etc/init.d/jboss {start|stop|restart}"
        exit 1

exit 0

I have tried sudo update-rc.d defaults

But it does not load! Where am i going wrong here? I am running ubuntu 10.10

share|improve this question
Have you tried it with --chuid jboss already? (instead of charlie) – ott-- Aug 6 '12 at 20:50
What do you mean 'does not load'? – quanta Aug 7 '12 at 7:52
When the machine has finished booting the script has not run what it should have run – Charlie Davies Aug 7 '12 at 16:17

You may have the file located in the /etc/init.d directory correctly, but you need to do another step: Run the update-rc.d to enable the init file to run in the various run levels.

share|improve this answer
I have done this and it still fails to load on boot? – Charlie Davies Aug 7 '12 at 16:16
Are the file perms 755? – mdpc Aug 7 '12 at 17:01

Your Answer


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.