Keresés

Új hozzászólás Aktív témák

  • ojb

    tag

    válasz Rolly #8313 üzenetére

    Én ezt használom. Op rendszerben fut és http-n lekérdez, ellenőriz...
    #!/bin/sh

    while true; do

    domoticzcheck=$(curl --max-time 60 -k -s "http://192.168.1.150:8080/json.htm?type=command¶m=getversion" | grep '"status"' | awk '{ print $3 }' | sed 's/[\,"]//g')
    if [ "$domoticzcheck" != OK ]] ; then
    echo "Domoticz not running, checking again in 30 seconds."
    sleep 30
    domoticzcheck=$(curl --max-time 60 -k -s "http://192.168.1.150:8080/json.htm?type=command¶m=getversion" | grep '"status"' | awk '{ print $3 }' | sed 's/[\,"]//g')
    if [ "$domoticzcheck" != OK ]] ; then
    echo "Watchguard is restarting Domoticz"
    service domoticz stop
    service domoticz start
    fi
    else
    echo "Domoticz is running..."
    fi

    sleep 10
    done

    Természetesen a http:// Domo.IP:port

Új hozzászólás Aktív témák