Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ping -c3 10.8.3.0 > pingreport
- result=`grep "0 received" pingreport`
- truncresult="`echo "$result" | sed 's/^(.................................).*$/1/'`"
- if [[ $truncresult == "3 packets transmitted, 0 received" ]]; then
- pon VPNname
- fi
- */1 * * * * bash /root/vpn-check.sh > /root/cronlog.txt 2>&1
- */1 * * * * /root/vpn-check.sh > /root/cronlog.txt 2>&1
- */1 * * * * /usr/sbin/pppd call VPNname> /root/cronlog.txt 2>&1
- crontab -e
- SHELL=/bin/sh
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- #!/bin/bash
- ping -c3 10.8.3.0 > pingreport
- result=`grep "0 received" pingreport`
- truncresult="`echo "$result" | sed 's/^(.................................).*$/1/'`"
- if [[ $truncresult == "3 packets transmitted, 0 received" ]]; then
- pon VPNname
- fi
- */1 * * * * root bash /root/vpn.sh
Add Comment
Please, Sign In to add comment