then echo $date"offline" >> /root/script/vpn_reconnect.log /usr/sbin/pppd call build
sleep 5
/usr/sbin/route add -net 172.16.16.231 netmask 255.255.255.255 dev ppp0
else echo $date"online" >> /root/script/vpn_reconnect.log fi
计划任务如果不设置环境变量,可能会出现命令执行失败的问题
Jan 1818:53:02 localhost pppd[20850]: pppd 2.4.5 started by root, uid 0 Jan 1818:53:02 localhost pppd[20850]: Couldn't get channel number: Input/output error Jan 1818:53:02 localhost pppd[20850]: Exit.