From 3e07de22581c246a17d85d827bcf5c73d8fe01ae Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 16 Mar 2012 09:24:19 +0100 Subject: [PATCH] updated reconnect scripts --- bash_scripts/fritzbox | 5 +++++ bash_scripts/router | 4 ---- bash_scripts/zyxel | 13 +++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100755 bash_scripts/fritzbox delete mode 100755 bash_scripts/router create mode 100644 bash_scripts/zyxel diff --git a/bash_scripts/fritzbox b/bash_scripts/fritzbox new file mode 100755 index 0000000..1f89877 --- /dev/null +++ b/bash_scripts/fritzbox @@ -0,0 +1,5 @@ +#!/bin/bash +curl 'http://fritz.box:49000/upnp/control/WANIPConn1' \ + -H 'Content-Type: text/xml; charset="utf-8"' \ + -H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \ + -d ' ' diff --git a/bash_scripts/router b/bash_scripts/router deleted file mode 100755 index efbf142..0000000 --- a/bash_scripts/router +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -curl 'http://fritz.box:49000/upnp/control/WANIPConn1' \ - -H 'Content-Type: text/xml; charset="utf-8"' \ - -H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' -d ' ' diff --git a/bash_scripts/zyxel b/bash_scripts/zyxel new file mode 100644 index 0000000..14ab1d0 --- /dev/null +++ b/bash_scripts/zyxel @@ -0,0 +1,13 @@ +#!/bin/bash + +IP=192.168.1.1 +USER=admin + +# change password here +#PW= + +OLD_IP=`wget http://checkip.dyndns.org/ -O /dev/stdout 2>/dev/null | sed "s/.*Current IP Address: \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/"` +echo "Alte IP: $OLD_IP" +curl http://$USER:$PW@$IP/Forms/DiagADSL_1 -d "LineInfoDisplay=&DiagDSLDisconnect=PPPoE+Trennung" +NEW_IP=`wget http://checkip.dyndns.org/ -O /dev/stdout 2>/dev/null | sed "s/.*Current IP Address: \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/"` +echo "Neue IP: $NEW_IP"