service 745 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. # This script "concentrates" all of our Java invocations into a single location
  3. # for maintainability.
  4. # Verify SERVICE_HOME
  5. if [ -z "${SERVICE_HOME}" ]; then
  6. echo 'This command is not intended to be run directly. Please see documentation on using service commands.'
  7. exit 1
  8. fi
  9. # Check our Java env
  10. if [ -n "${JAVA_HOME:+x}" ]; then
  11. JAVA_COMMAND=${JAVA_HOME}/bin/java
  12. else
  13. echo JAVA_HOME is not set
  14. exit 1
  15. fi
  16. LIBDIR=${SERVICE_HOME}/lib
  17. # If a classpath exists preserve it
  18. CP=$CLASSPATH
  19. # Check for cygwin bash so we use the correct path separator
  20. for jar in $(ls $LIBDIR/*.jar) ; do
  21. CP=${CP}:$jar
  22. done
  23. exec ${JAVA_COMMAND} ${SERVICE_JVM_ARGS} -classpath "${CP}" com.amazon.webservices.Cli "$@"