Linux-Jboss-multi-init

From DevRandom

Jump to: navigation, search

A single init script that allows you stop/start multiple instances of Jboss. You can also start all of them together or one by one

Script is here [jboss-multi-init]

Here's how it works :-


/etc/init.d/jboss status ; /etc/init.d/jboss start ; /etc/init.d/jboss status; /etc/init.d/jboss start; /etc/init.d/jboss stop; /etc/init.d/jboss status; /etc/init.d/jboss start inst1 ; /etc/init.d/jboss status

/opt/jboss/jboss-4/bin/run.sh -c inst1  :: NOT running
/opt/jboss/current/bin/run.sh -c inst2  :: NOT running

Starting /opt/jboss/jboss-4/bin/run.sh -c inst1  ::  Renaming logs :(sleeping 10 seconds) : instance started PID=17003
Starting /opt/jboss/current/bin/run.sh -c inst2  ::  Renaming logs :(sleeping 10 seconds) : instance started PID=17115

/opt/jboss/jboss-4/bin/run.sh -c inst1  :: PID = 17003
/opt/jboss/current/bin/run.sh -c inst2  :: PID = 17115

Starting /opt/jboss/jboss-4/bin/run.sh -c inst1  ::  instance already running PID=17003
Starting /opt/jboss/current/bin/run.sh -c inst2  ::  instance already running PID=17115

Stopping /opt/jboss/jboss-4/bin/run.sh -c inst1  :: Stopping PID=17003 : (sleeping 10 seconds, max tries: 5) :SUCCESS
Stopping /opt/jboss/current/bin/run.sh -c inst2  :: Stopping PID=17115 : (sleeping 10 seconds, max tries: 5) :SUCCESS

/opt/jboss/jboss-4/bin/run.sh -c inst1  :: NOT running
/opt/jboss/current/bin/run.sh -c inst2  :: NOT running

Starting /opt/jboss/jboss-4/bin/run.sh -c inst1  ::  Renaming logs :(sleeping 10 seconds) : instance started PID=17401

/opt/jboss/jboss-4/bin/run.sh -c inst1  :: PID = 17401
/opt/jboss/current/bin/run.sh -c inst2  :: NOT running



Views
Personal tools
About Me

Blog

Contact Me

Resume

Photos