Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After spending a couple of hours of snooping around I ended up creating <code>/etc/init.d/jboss</code> with the following contents</p> <pre><code>#!/bin/sh ### BEGIN INIT INFO # 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 ### END INIT INFO # #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/java.sh ] &amp;&amp; . /etc/profile.d/java.sh [ -r /etc/profile.d/jboss.sh ] &amp;&amp; . /etc/profile.d/jboss.sh case "$1" in start) echo "Starting JBoss AS 7.0.0" #original: #sudo -u jboss sh ${JBOSS_HOME}/bin/standalone.sh #updated: start-stop-daemon --start --quiet --background --chuid jboss --exec ${JBOSS_HOME}/bin/standalone.sh ;; stop) echo "Stopping JBoss AS 7.0.0" #original: #sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-admin.sh --connect command=:shutdown #updated: start-stop-daemon --start --quiet --background --chuid jboss --exec ${JBOSS_HOME}/bin/jboss-admin.sh -- --connect command=:shutdown ;; *) echo "Usage: /etc/init.d/jboss {start|stop}" exit 1 ;; esac exit 0 </code></pre> <p>Here's the content of <code>java.sh</code>:</p> <pre><code>export JAVA_HOME=/usr/lib/jvm/java_current export PATH=$JAVA_HOME/bin:$PATH </code></pre> <p>And <code>jboss.sh</code>:</p> <pre><code>export JBOSS_HOME=/opt/jboss/as/jboss_current export PATH=$JBOSS_HOME/bin:$PATH </code></pre> <p>Obviously, you need to make sure, you set JAVA_HOME and JBOSS_HOME appropriate to your environment.</p> <p>then I ran <code>sudo update-rc.d jboss defaults</code> so that JBoss automatically starts on system boot</p> <p>I found <a href="http://wiki.debian.org/LSBInitScripts" rel="noreferrer">this article</a> to be helpful in creating the start-up script above. Again, the script above is for Ubuntu (version 10.04 in my case), so using it in Fedora/RedHat or CentOS will probably not work (the setup done in the comments is different for those).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload