different backups for primary and secondary
[scripts/scripts.git] / check_dsl.sh
1 #!/bin/sh
2
3 # check for dsl connection. 
4
5 if [ -z "`/sbin/ifconfig | grep ppp0`" ]; then
6         echo "`date`: trying to connect to the world again ..." >> \
7                 /var/log/messages 2>&1
8         #
9         # start isdn if it works ...
10         # /etc/init.d/isdn start
11         #
12         
13         # by now: retry every 10 minuites if broken
14         /etc/init.d/rp-pppoe start
15         RETVAL=$?
16         echo "debug: RETVAL = $RETVAL" >> /var/log/messages 2>&1
17         [ "$RETVAL" = "0" ] && /etc/ppp/ip-up
18 fi
19