#!/bin/bash

# checks the return code from java
check_errs()
{
  # Function. Parameter 1 is the return code
  if [ "${1}" -ne "0" ]; then
    exit ${1}
  fi
}

# please set the following paths
JAVA_HOME=/usr/local/jdk1.5.0_03
RDF_AGENT_HOME=/path/to/home/dir/of/rdfagent

$JAVA_HOME/bin/java -DRDFagent.home=$RDF_AGENT_HOME -jar MOBYSync.jar $*
# did the agent die unexpectedly?
check_errs $?

# everything went smoothly
exit 0;
