[jboss-cvs] JBossAS SVN: r89169 - trunk/server/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 20 05:09:33 EDT 2009


Author: jfrederic.clere at jboss.com
Date: 2009-05-20 05:09:33 -0400 (Wed, 20 May 2009)
New Revision: 89169

Modified:
   trunk/server/src/bin/jboss_init_solaris.sh
Log:
Use bash and adjust isJBossRunning()


Modified: trunk/server/src/bin/jboss_init_solaris.sh
===================================================================
--- trunk/server/src/bin/jboss_init_solaris.sh	2009-05-20 08:50:26 UTC (rev 89168)
+++ trunk/server/src/bin/jboss_init_solaris.sh	2009-05-20 09:09:33 UTC (rev 89169)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/bash
 #
 # $Id: jboss_init_solaris.sh 57106 2006-09-23 14:09:54Z dimitris at jboss.org $
 #
@@ -101,12 +101,16 @@
 isJBossRunning()
 {
     JBossHome=$2 JBossUserId=$1 instance=$3
-    isJBossRunningPid=0
     # pipeline reads 1st jboss pid if it is running for user, jboss home, and instance
     ps -u $JBossUserId -o pid -o args| 
-    grep "$JBossHome" | grep -v "grep" | grep "program.name=run.sh" > /tmp/$$.jboss
+    grep "Dprogram.name=run.sh" | grep -v "grep" > /tmp/$$.jboss
     read isJBossRunningPid junk < /tmp/$$.jboss
     rm -f /tmp/$$.jboss
+    if [ "x${isJBossRunningPid}" = "x" ]; then
+      return 1
+    else
+      return 0
+    fi
 }
 
 #USAGE: isUserOK




More information about the jboss-cvs-commits mailing list