-
Notifications
You must be signed in to change notification settings - Fork 20
/
kill-all.sh
executable file
·53 lines (47 loc) · 1.16 KB
/
kill-all.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
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
source PORTS.env
if [[ -f "./flight-data/routes/routes.pid" ]];
then
pid=$(cat ./flight-data/routes/routes.pid)
echo "Killing routes service $pid"
kill $pid
rm -f ./flight-data/routes/routes.pid
else
echo "No routes service pid found"
fi
if [[ -f "./flight-data/flights/flights.pid" ]];
then
pid=$(cat ./flight-data/flights/flights.pid)
echo "Killing flights service $pid"
kill $pid
rm -f ./flight-data/flights/flights.pid
else
echo "No flights service pid found"
fi
if [[ -f "./sales/customer/customer.pid" ]];
then
pid=$(cat ./sales/customer/customer.pid)
echo "Killing customer service $pid"
kill $pid
rm -f ./sales/customer/customer.pid
else
echo "No customer service pid found"
fi
if [[ -f "./sales/bookings/bookings.pid" ]];
then
pid=$(cat ./sales/bookings/bookings.pid)
echo "Killing bookings service $pid"
kill $pid
rm -f ./sales/bookings/bookings.pid
else
echo "No bookings service pid found"
fi
if [[ -f "./experience/experience.pid" ]];
then
pid=$(cat ./experience/experience.pid)
echo "Killing experience service $pid"
kill $pid
rm -f ./experience/experience.pid
else
echo "No experience service pid found"
fi