From: Michael Wagner Date: Fri, 12 Apr 2019 22:20:59 +0000 (+0200) Subject: epic-ts X-Git-Tag: xfhem_0.1-1~5 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=915c0e414a102e244aa4b3b3ca9b3aa1a94fe50a;p=xhome.git epic-ts --- diff --git a/TestXfhem/FitnessePages/TestWatchdog/.dummy b/TestXfhem/FitnessePages/TestWatchdog/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/TestXfhem/FitnessePages/content.txt b/TestXfhem/FitnessePages/content.txt new file mode 100644 index 0000000..5f3d863 --- /dev/null +++ b/TestXfhem/FitnessePages/content.txt @@ -0,0 +1,2 @@ +#!contents -R2 -g -p -f -h +!contents diff --git a/TestXfhem/FitnessePages/properties.xml b/TestXfhem/FitnessePages/properties.xml new file mode 100644 index 0000000..72aa2b6 --- /dev/null +++ b/TestXfhem/FitnessePages/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/xfhem/bin/xfhem b/xfhem/bin/xfhem new file mode 100755 index 0000000..a1e6ad1 --- /dev/null +++ b/xfhem/bin/xfhem @@ -0,0 +1,51 @@ +#!/bin/bash + +usage="xfhem [define|delete] watchdog [SERVER]" + +PATH="/opt/fhem:$PATH" + +function process_watchdog { + server=$1 + case $operation in + define) + if [ -z "$server" ] + then + echo "SERVER required for define operation" + echo $usage + exit 1 + fi + fhem.pl 7072 "define watchdog at +*00:10:00 \"/usr/share/sysal/bin/triggerWatchdog_REST http://$server/sysal/rest rwd-$hostname $hostname\"" + ;; + delete) + fhem.pl 7072 "delete watchdog" + ;; + *) + echo "invalid operation $operation" + echo $usage + exit 1 + ;; + esac +} + +if [ $# -lt 2 ] +then + echo $usage + exit 1 +fi + +operation=$1 +object=$2 + +hostname=$(hostname) + +case $2 in +watchdog) + process_watchdog $3 + ;; +*) + echo "invalid object $2" + echo $usage + exit 1 + ;; +esac + diff --git a/xfhem/etc/wagnertech.cfg b/xfhem/etc/wagnertech.cfg new file mode 100644 index 0000000..386aab0 --- /dev/null +++ b/xfhem/etc/wagnertech.cfg @@ -0,0 +1,2 @@ +define telnetPort telnet 7072 +