-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-entrypoint.sh
executable file
·37 lines (34 loc) · 1021 Bytes
/
docker-entrypoint.sh
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
36
37
#!/bin/bash
if [[ ! -x "$(command -v start-agent.sh)" ]]; then
echo "[ERROR] start-agent.sh is not executable."
exit 1
fi
if [[ "$1" == "consumer" ]]; then
echo "Starting consumer service..."
nohup java -jar \
-Dlogs.dir=/root/logs \
/root/dists/mesh-consumer.jar \
> /dev/null 2>&1 &
elif [[ "$1" == "provider-small" ]]; then
echo "Starting small provider service..."
nohup java -jar \
-Dlogs.dir=/root/logs \
/root/dists/mesh-provider.jar \
> /dev/null 2>&1 &
elif [[ "$1" == "provider-medium" ]]; then
echo "Starting medium provider service..."
nohup java -jar \
-Dlogs.dir=/root/logs \
/root/dists/mesh-provider.jar \
> /dev/null 2>&1 &
elif [[ "$1" == "provider-large" ]]; then
echo "Starting large provider service..."
nohup java -jar \
-Dlogs.dir=/root/logs \
/root/dists/mesh-provider.jar \
> /dev/null 2>&1 &
else
echo "[ERROR] Unrecognized arguments, exit."
exit 1
fi
start-agent.sh "$@"