Skip to content

pppoe

*/2 * * * * /usr/bin/godaddy >/dev/null 2>&1
*/1 * * * * /usr/bin/pppoe >/dev/null 2>&1
cat /usr/bin/pppoe 
#!/bin/bash

ping google.com -c 1 >/tmp/ping.txt
#ping 192.168.11.2 -c 1 >/tmp/ping.txt
TTL=$(cat /tmp/ping.txt | grep ttl)

if [ -z "$TTL" ]; then
    echo "\$TTL is NULL"
    poff dsl-provider #off
    sleep 1
    pon dsl-provider #for on
else
    echo "\$TTL is NOT NULL"
fi
Published inUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *