#!/bin/sh



search_pid=`ps |grep -v 'grep'|grep -v 'sh' |grep -v 'rpxc'|grep -c 'kpl-robot'`

echo "kpl-robot: $search_pid"
  
if [ $search_pid -eq 0 ]  
then
  applocal=kpl-robot
  cd /geo/app/kpl
  ./$applocal -cmd-addr=:8081 -config-file=plugs-robot.json -uuidfile=app.uuid &
  echo "`date +"%Y/%m/%d %H:%M:%S"` $applocal started" >> kplrobot.log
fi

