Author: heiko.braun(a)jboss.com
Date: 2007-01-19 07:18:22 -0500 (Fri, 19 Jan 2007)
New Revision: 2010
Modified:
trunk/build/etc/hudson/AS-5.x-init.sh
Log:
Simplified start script
Modified: trunk/build/etc/hudson/AS-5.x-init.sh
===================================================================
--- trunk/build/etc/hudson/AS-5.x-init.sh 2007-01-19 12:13:27 UTC (rev 2009)
+++ trunk/build/etc/hudson/AS-5.x-init.sh 2007-01-19 12:18:22 UTC (rev 2010)
@@ -1,92 +1,16 @@
#!/bin/sh
-#
-# $Id: jboss_init_redhat.sh 46554 2006-07-28 10:29:13Z dimitris $
-#
-# JBoss Control Script
-#
-# To use this script run it as root - it will switch to the specified user
-#
-# 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.
-#
-# Either modify this script for your requirements or just ensure that
-# the following variables are set correctly before calling the script.
#define where jboss is - this is the directory containing directories log, bin, conf etc
-JBOSS_HOME=../../../../AS-5.x/workspace/trunk/build/output/jboss-5.0.0.Beta2/
+JBOSS_INSTANCE=../../../../AS-5.x/workspace/trunk/build/output/jboss-5.0.0.Beta2/
-#define the user under which jboss will run, or use 'RUNASIS' to run as the
current user
-JBOSS_USER=RUNASIS
-
-#make sure java is in your path
-JAVAPTH=${JAVAPTH:-"/usr/local/jdk/bin"}
-
-#configuration to use, usually one of 'minimal', 'default',
'all'
-JBOSS_CONF=${JBOSS_CONF:-"default"}
-
-#bind address for jboss services, by default bind to *all* NICs
-JBOSS_HOST=${JBOSS_HOST:-"0.0.0.0"}
-
-#define the classpath for the shutdown class
-JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
-
-#define the script to use to start jboss
-JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF -b $JBOSS_HOST"}
-
-if [ "$JBOSS_USER" = "RUNASIS" ]; then
- SUBIT=""
-else
- SUBIT="su - $JBOSS_USER -c "
-fi
-
-if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
- # ensure the file exists
- touch $JBOSS_CONSOLE
- if [ ! -z "$SUBIT" ]; then
- chown $JBOSS_USER $JBOSS_CONSOLE
- fi
-fi
-
-if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
- echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
- echo "WARNING: ignoring it and using /dev/null"
- JBOSS_CONSOLE="/dev/null"
-fi
-
-#define what will be done with the console log
-JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
-
-JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
-JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown
--shutdown"}
-
-if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
- export PATH=$PATH:$JAVAPTH
-fi
-
-if [ ! -d "$JBOSS_HOME" ]; then
- echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
- exit 1
-fi
-
-echo JBOSS_CMD_START = $JBOSS_CMD_START
-
case "$1" in
start)
- cd $JBOSS_HOME/bin
- if [ -z "$SUBIT" ]; then
- eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
- else
- $SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
- fi
+ cd $JBOSS_INSTANCE/bin
+ ./run.sh > /dev/null &
;;
stop)
- if [ -z "$SUBIT" ]; then
- $JBOSS_CMD_STOP
- else
- $SUBIT "$JBOSS_CMD_STOP"
- fi
+ cd $JBOSS_INSTANCE/bin
+ ./shutdown.sh -S > /dev/null &
;;
restart)
$0 stop
Show replies by date