-
[scripts/scripts.git] / check_dsl.sh
diff --git a/check_dsl.sh b/check_dsl.sh
new file mode 100755 (executable)
index 0000000..8853032
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# check for dsl connection. 
+
+if [ -z "`/sbin/ifconfig | grep ppp0`" ]; then
+       echo "`date`: trying to connect to the world again ..." >> \
+               /var/log/messages 2>&1
+       #
+       # start isdn if it works ...
+       # /etc/init.d/isdn start
+       #
+       
+       # by now: retry every 10 minuites if broken
+       /etc/init.d/rp-pppoe start
+       RETVAL=$?
+       echo "debug: RETVAL = $RETVAL" >> /var/log/messages 2>&1
+       [ "$RETVAL" = "0" ] && /etc/ppp/ip-up
+fi
+