forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlbclient.sh
More file actions
executable file
·36 lines (29 loc) · 752 Bytes
/
lbclient.sh
File metadata and controls
executable file
·36 lines (29 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
ARGUMENTS="$@"
homeSet() {
echo "MEMBRANE_HOME variable is now set"
if [ "$JAVA_HOME" ] ; then
exec java -cp "${JAVA_HOME}/jre/lib/ext/*:${MEMBRANE_HOME}/lib/*" com.predic8.membrane.balancer.client.LBNotificationClient $ARGUMENTS
else
echo "Please set the JAVA_HOME environment variable."
fi
}
terminate() {
echo "Starting of Membrane Router Load Balancer Client failed."
echo "Please execute this script from the MEMBRANE_HOME/examples/loadbalancer-client-2 directory"
exit 1
}
homeNotSet() {
echo "MEMBRANE_HOME variable is not set"
if [ -f "`pwd`/../../../starter.jar" ] ; then
export MEMBRANE_HOME="`pwd`/../../.."
homeSet
else
terminate
fi
}
if [ "${MEMBRANE_HOME}" ] ; then
homeSet
else
homeNotSet
fi