#!/bin/sh
cd `dirname $0`

MAINCLASS=com.uino.thingjs2.demoserver.ServerMain

export PRO_PID=`ps -ef | grep $MAINCLASS|grep -v grep|awk '{print $2}'`
echo $PRO_PID

if [ -n "$PRO_PID" ]; then
   kill -9 $PRO_PID
fi

sleep 2

./scan.sh
