13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

460Chapter 20Open Source Web <str<strong>on</strong>g>Applicati<strong>on</strong></str<strong>on</strong>g> ServersExample 20.4 Out-of-the-box JBoss init script for RedHat#!/bin/sh## JBoss C<strong>on</strong>trol Script## chkc<strong>on</strong>fig: 3 80 20# descripti<strong>on</strong>: JBoss EJB C<strong>on</strong>tainer## To use this script,# run it as root - it will switch to the specified user.# It loses all c<strong>on</strong>sole output - use the log.## Here is a little (and extremely primitive)# startup/shutdown script for RedHat systems. It assumes# that JBoss lives in /usr/local/jboss, it's run by user# 'jboss' and JDK binaries are in /usr/local/jdk/bin. All# this can be changed in the script itself.# Bojan## Either amend this script for your requirements# or just ensure that the following variables are set correctly# before calling the script.# [ #420297 ] JBoss startup/shutdown for RedHat# define where jboss is - this is the directory# c<strong>on</strong>taining directories log, bin, c<strong>on</strong>f, etc.JBOSS_HOME=${JBOSS_HOME:-"/usr/local/jboss"}# make sure Java is <strong>on</strong> your pathJAVAPTH=${JAVAPTH:-"/usr/local/jdk/bin"}# define the classpath for the shutdown classJBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}# define the script to use to start jbossJBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c all"}if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then# ensure the file existstouch $JBOSS_CONSOLEfi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!