-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·43 lines (39 loc) · 1.29 KB
/
start.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
38
39
40
41
42
43
#!/bin/bash
PID_FILE=services.pid
if [ -f "$PID_FILE" ]; then
echo "PID file $PID_FILE exists. Can't start services"
else
echo "Starting services"
nohup java \
-javaagent:${APPDYNAMICS_AGENT_LOCATION} \
-Dappdynamics.agent.tierName=customer \
-Dappdynamics.agent.nodeName=customer-1 \
-Dspring.profiles.active=local \
-jar services/customer/build/libs/customer-0.0.1-SNAPSHOT.jar \
> nohup.customer.out 2>&1 &
echo $! >> $PID_FILE
nohup java \
-javaagent:${APPDYNAMICS_AGENT_LOCATION} \
-Dappdynamics.agent.tierName=product \
-Dappdynamics.agent.nodeName=product-1 \
-Dspring.profiles.active=local \
-jar services/product/build/libs/product-0.0.1-SNAPSHOT.jar \
> nohup.product.out 2>&1 &
echo $! >> $PID_FILE
nohup java \
-javaagent:${APPDYNAMICS_AGENT_LOCATION} \
-Dappdynamics.agent.tierName=order \
-Dappdynamics.agent.nodeName=order-1 \
-Dspring.profiles.active=local \
-jar services/order/build/libs/order-0.0.1-SNAPSHOT.jar \
> nohup.order.out 2>&1 &
echo $! >> $PID_FILE
nohup java \
-Dspring.profiles.active=local \
-jar services/load/build/libs/load-0.0.1-SNAPSHOT.jar \
> nohup.load.out 2>&1 &
echo $! >> $PID_FILE
sleep 1
cat $PID_FILE
echo "Started services"
fi