forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmembrane.sh
More file actions
executable file
·21 lines (18 loc) · 806 Bytes
/
membrane.sh
File metadata and controls
executable file
·21 lines (18 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Default: ./proxies.xml (next to this script); fallback -> $MEMBRANE_HOME/conf/proxies.xml
# JAVA_OPTS: relative -D paths are auto-resolved against $MEMBRANE_HOME (absolute/URI unchanged).
# Examples:
# export JAVA_OPTS='-Dlog4j.configurationFile=examples/logging/access/log4j2_access.xml'
# export JAVA_OPTS='-Dlog4j.configurationFile=/abs/path/log4j2.xml'
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
dir="$SCRIPT_DIR"
while [ "$dir" != "/" ]; do
if [ -f "$dir/LICENSE.txt" ] && [ -f "$dir/scripts/run-membrane.sh" ]; then
export MEMBRANE_HOME="$dir"
export MEMBRANE_CALLER_DIR="$SCRIPT_DIR"
exec sh "$dir/scripts/run-membrane.sh" "$@"
fi
dir=$(dirname "$dir")
done
echo "Could not locate Membrane root. Ensure directory structure is correct." >&2
exit 1