./server
        while :
        do
        sleep 3
        RESULT=`ps -e|grep 'server'|sed -e "/grep/d"`
        if [ -z "$RESULT" ];then #判断RESULT是否为空,为空则说明进程未启动
        ./server
        fi
        done




Logo

更多推荐