#date:2019年9月12
#auth:jack_yd
#!/bin/bash
port=`netstat -anlpt | grep 5099 |awk '{print $4}'|cut -d: -f2`
if [ $port==5099 ]
then
echo "Script run normal";
else
nohup python /root/python/docker_deploy.py >/root/python/depolylog.txt 2>&1 &
Testing_server;
fi
function Testing_server(){
if [ $port!="" ]
then
echo "Script run normal"
else
nohup python /root/python/docker_deploy.py >/root/python/depolylog.txt 2>&1 &
fi
}