#!/bin/bash

# */1 * * * * /home/lbs/checkrun.sh
shpath=$(cd $(dirname $0);pwd)
cd $shpath

appname=plg-app
cmdaddr=:8204

search_pid=`ps -ef|grep -v 'grep'|grep -v 'sh' |grep -v 'rpxc-mipsle'|grep -c $appname`

echo "$appname: $search_pid"

if [ $search_pid -eq 0 ]
then
  $shpath/$appname -cmd-addr=$cmdaddr -config-file=plugs-json.json -uuidfile=$appname.uuid &
fi