Hauptmenü

Werkzeuge

Kategorien

Archiv

Tineco nass und trockensauger Einhell Shelly H&T Gen3 Liste von RTSP URLs für gängige Kameras Freischneider Test 2026 Test Wärmepumpentrockner 2026

Reconnect mit cURL und Shell Script

Erstellt in Allgemein am 12. April 2017 vom Daschmi

XML Datei für die Anfrage:

<?xml version="1.0" encoding="utf-8" ?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" />
</s:Body>
</s:Envelope>

Shell Script, welches die FRITZ!Box dazu bewegt die Internetverbindung neu aufzubauen:

#!/bin/bash
curl -s "http://fritz.box:49000/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "@reconnect.xml" >/dev/null