Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # (c) Copyright 1999-2010 Netop Tech AG
- #
- # A simple shell script to launch the client software on a Linux/Unix
- # system.
- #
- #
- # Make sure our current working dir is set to the location of this script
- #
- cd `dirname $0`
- #
- # Find Java (5.0+)
- #
- if [ -z "${JAVACMD}" -a -x runtime/linux-i686/jre/bin/java ]; then
- JAVACMD=runtime/linux-i686/jre/bin/java
- fi
- if [ -z "${JAVACMD}" -a -x runtime/linux-x64/jre/bin/java ]; then
- system_arch=`uname -m 2>/dev/null`
- if [ "${system_arch}" = "x86_64" ]; then
- JAVACMD=runtime/linux-x64/jre/bin/java
- fi
- fi
- if [ -z "${JAVACMD}" ]; then
- JAVACMD=`which java 2> /dev/null`
- if [ ! -x "${JAVACMD}" ]; then
- JAVACMD=
- fi
- fi
- if [ -z "${JAVACMD}" -a -n "${JAVA_HOME}" ]; then
- JAVACMD="${JAVA_HOME}/bin/java"
- fi
- if [ ! -x "${JAVACMD}" ]; then
- echo "Error: JAVA_HOME is not defined!" 1>&2
- echo "Please ensure Java 5.0 or higher is installed and java is on the path" 1>&2
- exit 1
- fi
- #
- # Construct the classpath
- #
- if [ "X`echo -n`" = "X-n" ]; then
- echo_n() { echo ${1+"$@"}"\c"; }
- else
- echo_n() { echo -n ${1+"$@"}; }
- fi
- #
- # Construct our classpath. The zip file(s) are used for custom messages. We need to ensure
- # these add to the classpath first so they take priority (if they exist).
- #
- classpath=`(ls lib-ext/client-custom-messages.zip 2>/dev/null; ls lib/*.jar) | while read line
- do
- echo_n "${line}:"
- done`
- #
- # Run the program
- #
- exec "${JAVACMD}" -classpath "${classpath}" \
- -Dclient.home=. biz.papercut.pcng.client.uit.UserClient "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement