














cd /home/xwj/
nano .bashrc
function network()
{
#超时时间
local timeout=1
#目标网站
local target=www.baidu.com
#获取响应状态码
local ret_code=`curl -I -s --connect-timeout ${timeout} ${target} -w %{http_code} | tail -n1`
if [ "x$ret_code" = "x200" ]; then
return 1
else
return 0
fi
return 0
}
network
if [ $? -eq 0 ];then
echo "no internet connect..."
sleep 10
else
echo "internet is working...."
break
fi
cd /home/xwj/
python xwjplayer.py
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。