#!/usr/share/ucs-test/runner bash
# shellcheck shell=bash
## desc: Check univention-ssh signal
## bugs: [17874]
## tags: [univention]
## packages: [univention-ssh]
## exposure: safe

# shellcheck source=../../lib/base.sh
. "$TESTLIBPATH/base.sh" || exit 137

result="$(univention-ssh "$tests_root_pwdfile" "root@${hostname}.${domainname}" echo BEFORE \; kill '$$' \; echo AFTER)"
if [ $? -eq 0 ]
then
	exit 110 # ERROR
elif ! grep -q BEFORE <<<"$result"
then
	exit 110 # ERROR
elif grep -q AFTER <<<"$result"
then
	exit 110 # ERROR
else
	exit 100 # OK
fi
# vim:set ft=sh:
