东方红番号方大化工东方红烦得很东方红
看一下
添加不了计划,说未连接网络
可以的……
好东西 ,先观望下
学习一下
看看有没有效果
#!/bin/bash
dt=`date '+%d/%m/%Y %H:%M:%S'`
sleep 60;
> /result.txt
num=`ping -c20 192.168.3.1 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
echo $num
echo $?
if [ $? -eq 0 -a $num -eq 0 ]; then
echo "$dt ok" >> /result.txt
else
echo "$dt noip loss $num reboot" >> /result.txt
reboot
fi
谢谢~~~~~~~~~~~~~