13 lines
557 B
Bash
Executable file
13 lines
557 B
Bash
Executable file
#!/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"
|