#!/bin/sh -f
if [ $# = 0 -o x$1 = x-h ]; then
    p=$(basename $0)
    echo "Usage: $p host [remote xlassie options]"
    echo " runs xlassie on remote host via ssh, restarting upon exit"
    exit 1
fi
h=$1
shift
while true; do
    ssh -n -X ${h} xlassie "$@"
    echo -n "remote xlassie terminated ..."
    sleep 10
    echo " restarting"
done
