Skip to content

Commit

Permalink
make start/stop scripts can work on both ubuntu and centos
Browse files Browse the repository at this point in the history
Signed-off-by: ywang19 <yaguang.wang@intel.com>
  • Loading branch information
ywang19 committed Nov 8, 2014
1 parent c2f16d5 commit e4449f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions release/cosbench-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OSGI_CONFIG=conf/.$SERVICE_NAME
TOMCAT_CONFIG=conf/$SERVICE_NAME-tomcat-server.xml

TOOL="nc"
TOOL_PARAMS="-q 1"
TOOL_PARAMS="-i 0"

#-------------------------------
# MAIN
Expand Down Expand Up @@ -80,7 +80,7 @@ do
attempts=60
while [ $ready -ne 1 ];
do
echo "ss -s ACTIVE cosbench" | $TOOL $TOOL_PARAMS localhost $OSGI_CONSOLE_PORT | grep $module >> /dev/null
echo "ss -s ACTIVE cosbench" | $TOOL $TOOL_PARAMS 0.0.0.0 $OSGI_CONSOLE_PORT | grep $module >> /dev/null
if [ $? -ne 0 ];
then
attempts=`expr $attempts - 1`
Expand Down
2 changes: 1 addition & 1 deletion release/cosbench-stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fi

which $TOOL 1>&2 >/dev/null
if [ $? -eq 0 ]; then
echo "exit" | $TOOL localhost $OSGI_CONSOLE_PORT >> /dev/null
echo "exit" | $TOOL 0.0.0.0 $OSGI_CONSOLE_PORT >> /dev/null
else
pid=`ps -eo pid,cmd |grep java |grep $SERVICE_NAME |cut -d" " -f1`
kill $pid
Expand Down

0 comments on commit e4449f5

Please sign in to comment.