--- /dev/null
+<?xml version="1.0"?>
+<properties>
+ <Edit>true</Edit>
+ <Files>true</Files>
+ <Properties>true</Properties>
+ <RecentChanges>true</RecentChanges>
+ <Refactor>true</Refactor>
+ <Search>true</Search>
+ <Versions>true</Versions>
+ <WhereUsed>true</WhereUsed>
+</properties>
--- /dev/null
+#!/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
+