#!/bin/bash


search_pid=`ps -ef|grep -v 'grep'|grep -v 'sh' |grep -c 'knetcaster-serv'`

echo "knetcaster-serv: $search_pid"
  
if [ $search_pid -eq 0 ]  
then  
  cd /home/knetcaster/serv && ./knetcaster-serv -cmd-addr=:3000 -config-file=plugs-conf.json -uuidfile=app.uuid &
  TIMEIDSTR=$(date "+%Y%m%d%H%M%S")
  echo "knetcaster-serv $TIMEIDSTR 启动" >> startup.log
fi

