#!/bin/sh
# Author:sunrise
# Mail:1210353303@qq.com
# Name:check prot 8080

. /etc/init.d/functions

if [ `/usr/bin/netstat -lntup|grep 8080|wc -l` -eq 1 ]
   then
        action "JavaBridge is Running." /bin/true
else
	java -jar /www/wwwroot/JavaBridge/JavaBridge.jar SERVLET:8080 3 /www/wwwroot/JavaBridge/JavaBridge.log &	
        action "JavaBridge is Stopped." /bin/false
        echo "JavaBridge is Stopped." |mail -s "app06 JavaBridge is down,now is start" 1210353303@qq.com
fi
