[jboss-cvs] JBossAS SVN: r89466 - branches/Branch_5_x/server/src/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 27 10:50:54 EDT 2009
Author: jfrederic.clere at jboss.com
Date: 2009-05-27 10:50:54 -0400 (Wed, 27 May 2009)
New Revision: 89466
Modified:
branches/Branch_5_x/server/src/bin/jboss_init_solaris.sh
Log:
Corresponds to the comment in JBAS-6438.
Modified: branches/Branch_5_x/server/src/bin/jboss_init_solaris.sh
===================================================================
--- branches/Branch_5_x/server/src/bin/jboss_init_solaris.sh 2009-05-27 14:49:35 UTC (rev 89465)
+++ branches/Branch_5_x/server/src/bin/jboss_init_solaris.sh 2009-05-27 14:50:54 UTC (rev 89466)
@@ -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,24 @@
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
+ ps -u $JBossUserId -o pid -o args |
+ grep "${JBossHome}" | grep -v "grep" > /tmp/$$.jboss
read isJBossRunningPid junk < /tmp/$$.jboss
rm -f /tmp/$$.jboss
+ if [ "x${isJBossRunningPid}" = "x" ]; then
+ return 1
+ fi
+
+ ps -u $JBossUserId -o pid -o args -o ppid |
+ grep "Dprogram.name=run.sh" | grep -v "grep" | grep ${isJBossRunningPid} > /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