[jboss-jira] [JBoss JIRA] Created: (JBAS-7725) Linux shell script is not picking correctly JBoss AS PID in procrunning function
Marek Goldmann (JIRA)
jira-events at lists.jboss.org
Thu Feb 11 13:44:10 EST 2010
Linux shell script is not picking correctly JBoss AS PID in procrunning function
--------------------------------------------------------------------------------
Key: JBAS-7725
URL: https://jira.jboss.org/jira/browse/JBAS-7725
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-6.0.0.M1
Reporter: Marek Goldmann
Function procrunning is not picking correctly JBoss AS pid.
function procrunning() {
procid=0
JBOSSSCRIPT=$(echo $JBOSS_HOME/bin/run.sh|sed 's/\//\\\//g')
for procid in `pidof -x "$JBOSSSCRIPT"`; do
if [ ! -z $JBOSS_IP ]; then
ps -fp $procid | grep $JBOSSCONF | grep $JBOSS_IP > /dev/null && pid=$procid
else
ps -fp $procid | grep $JBOSSCONF > /dev/null && pid=$procid
fi
done
}
Proposed change:
function procrunning() {
procid=0
for procid in `pidof -x "/bin/sh"`; do
if [ ! -z $JBOSS_IP ]; then
ps -fp $procid | grep $JBOSSCONF | grep $JBOSS_IP > /dev/null && pid=$procid
else
ps -fp $procid | grep $JBOSSCONF > /dev/null && pid=$procid
fi
done
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list