Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

salve!

wollte ein windows cmd script für mac umschreiben damit man unseren router neustarten kann.

hab ein paar grundsätzliche fragen....mac baut doch auf unix auf?!

also könnte man shell-scripte die unter linux laufen auch unter mac ausführen oder?!

so zum script:

@echo off

Echo Router reconnect: AVM FRITZ!BOX FON WLAN 7170

curl "http://192.168.10.10:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "<?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>"

echo MsgBox "Router neugestartet", VBInformation + VbOKOnly, "Astalavista" >%TEMP%\os.vbs

START %TEMP%\os.vbs

könnte man dieses script umschreiben damit es unter unix läuft?

hab das damals mit cURL erstellt...man benötigt eine curl.exe dazu.

die exe implementiert den curl befehlssatz damit es verarbeitet werden kann!

grüße dave

ok, das schonmal ne gute information!

müsste dann ja so aussehen oder?

#!/bin/sh

clear

Echo Router reconnect: AVM FRITZ!BOX FON WLAN 7170

`curl "http://192.168.10.10:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "<?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>"`

nur was mit...:

echo MsgBox "Router neugestartet", VBInformation + VbOKOnly, "Astalavista" >%TEMP%\os.vbs

START %TEMP%\os.vbs

die message box heißt in der bash bzw unix doch bestimmt anders oder?

und der pfad müsste sich auch unterscheiden?!

danke schonmal

grüße dave

danke!

müsste dann ja so aussehen ... richtig? kann es gerade nicht testen :(

#!/bin/bash

clear

echo Router reconnect: AVM FRITZ!BOX FON WLAN 7170

`curl "http://192.168.10.10:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "<?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>"`

wird mir den apple-script kurs die nächsten tage reinziehen ;) danke für die ganzen tipps!!

mit freundlichem gruß dave

axo Backticks sind diese hier --> ` <-- ?

hatte die hochkommas weggemacht!

also alle entfernen bis auf die gänsefüschen ja???

oder auch die hochkommas drinlassen?

danke schonmal

gruß dave

axo Backticks sind diese hier --> ` <-- ?

Sie sollten zwar keine Probleme machen, aber Du brauchst sie hier nicht, denn Du hast in Deiner Curl-Anweisung keine Variablen. Lass es einfach mal laufen

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.