#! /bin/sh

prog=/usr/infodraw/bin/server.sh

test -x "$prog" || exit 0

case "$1" in
  start)
    echo "Starting MRS Server"
    cd /usr/infodraw/bin
    $prog &
    cd -
    ;;
  stop)
    echo "Stopping MRS Server"
    killall MRS_ServerProgram.exe
    ;;
  restart)
    echo "Restarting MRS Server"
    killall MRS_ServerProgram.exe
    sleep 2
    cd /usr/infodraw/bin
    $prog &
    cd -
    ;;
  *)
    echo "Usage: /etc/init.d/MRS_Server.sh {start|stop}"
    exit 1
esac

exit 0
