#!/bin/bash

if [ -f /tmp/call_php_async.log ]
then
	if [ ! -w /tmp/call_php_async.log ]
	then
		echo "log file /tmp/call_php_async.log not writeable."
		exit 1
	fi
fi

if [ -x /usr/share/php/SysAl/util/CallPhp.php ]
then
	(/usr/share/php/SysAl/util/CallPhp.php $1 /usr/share/php/SysAl/AlarmInterface/RemoteInterface/CallPhp.config &) 1>>/tmp/call_php_async.log 2>&1
else
	echo "CallPhp.php nicht gefunden"
	exit 1
fi

# return value for php shell_exec
echo "0"
