#!/bin/sh


case "`uname`" in
  Darwin*) if [ -z "$JAVA_HOME" ] ; then
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
           fi
           ;;
esac

PRG="$0"
FISHEYE_HOME=`dirname "$PRG"`/..
# make it fully qualified
FISHEYE_HOME=`cd "$FISHEYE_HOME" && pwd`

if [ ! -f "$FISHEYE_HOME/fisheyeboot.jar" ] ; then
  echo "Error: Could not find $FISHEYE_HOME/fisheyeboot.jar"  
  exit 1
fi



exec "$FISHEYE_HOME/bin/fisheyectl.sh" stop "$@"

