#!/bin/sh
#
# IBH Link UA
#
case $1 in

        start)

              # look if IBHLinkUA is already started
              if [ -n "`pidof IBHLinkUA`" ]; then
                echo "IBH Link UA already started"
              else

				cd /opt/IBHLinkUA
 				./IBHLinkUA --d

              fi
              ;;

    stop)

	echo -n "Terminating IBH Link UA ..."
	killall -s SIGTERM IBHLinkUA
	echo "done."
	;;

    *)
        # Start IBH Link UA by default.
	# This script will be executed within a new screen window.
	# screen cannot handle program parameter.
	$0 start
	;;

esac

cd
