#!/bin/sh

#***************************************************************************#
#                                                                           #
#  SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29              #
#  www.systec-electronic.com                                                #
#                                                                           #
#  File:         respawn                                                    #
#  Description:  respawns the program specified as parameter                #
#                everytime it exits                                         #
#                                                                           #
#  -----------------------------------------------------------------------  #
#                                                                           #
#  Revision History:                                                        #
#  2010/08/26 schulzema1 (TMS): removed useless if and goto!                #
#  2010/08/23 schulzema1 (TMS): added support for more parameters           #
#                               changed $1 $2 $3 $4 $5 to $@                #
#  2007/09/17 d.k.:  initial revision                                       #
#                                                                           #
#****************************************************************************


echo "[usr: respawn $1]"

while [ -f $1 ]; do
    $@
done

exit
