#!/bin/sh

start_edge(){
	killall edge
	/usr/bin/edge -a 192.168.123.200 -c bugxia_9527 -l n2n.s1.bugxia.com:9527 -r
}

check_running(){
	PID=`ps -ef | grep edge | grep -v grep | grep -v $0 | awk '{print $2}'`
	if [[ -z $PID ]];then
		start_edge
	else
		echo "Edge is running"
	fi
}

check_running