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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20.5 Things That Make It Go461if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; thenecho "WARNING: locati<strong>on</strong> for saving c<strong>on</strong>sole log invalid: $JBOSS_CONSOLE"echo "WARNING: ignoring it and using /dev/null"JBOSS_CONSOLE="/dev/null"fi# define what will be d<strong>on</strong>e with the c<strong>on</strong>sole logJBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}# define the user under which JBoss will run,# or use RUNASIS to run as the current userJBOSSUS=${JBOSSUS:-"jboss"}CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"CMD_STOP="java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"if [ "$JBOSSUS" = "RUNASIS" ]; thenSUBIT=""elseSUBIT="su - $JBOSSUS -c "fiif [ -z "`echo $PATH | grep $JAVAPTH`" ]; thenexport PATH=$PATH:$JAVAPTHfiif [ ! -d "$JBOSS_HOME" ]; thenecho JBOSS_HOME does not exist as a valid directory : $JBOSS_HOMEexit 1fiecho CMD_START = $CMD_STARTcase "$1" instart)cd $JBOSS_HOME/binif [ -z "$SUBIT" ]; theneval $CMD_START ${JBOSS_CONSOLE} 2>1else$SUBIT "$CMD_START ${JBOSS_CONSOLE} 2>1 "fi;;stop)if [ -z "$SUBIT" ]; then$CMD_STOPelse$SUBIT "$CMD_STOP"fi;;

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

Saved successfully!

Ooh no, something went wrong!