-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdk_init.sh
33 lines (30 loc) · 972 Bytes
/
dk_init.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
fail() {
name=$1
echo '-----------------------------------------------'
echo "---------- '${name}' failed to start! ----------"
echo '-----------------------------------------------'
exit 1
}
/wait-for -t 60 http://api:8080
if [ $? -ne 0 ]; then
fail 'api'
fi
/wait-for -t 10 http://admin:8000/admin/login
if [ $? -ne 0 ]; then
fail 'admin'
fi
/wait-for -t 10 http://web:80
if [ $? -ne 0 ]; then
fail 'web'
fi
if [ $? -eq 0 ]; then
sleep 5
echo '--------------------------------------------------------------------'
echo '------------ 系统全部启动成功! System started successfully ----------'
echo '--------------------------------------------------------------------'
else
echo '-----------------------------------------------------------'
echo '----------- 系统启动失败! System failed to start ----------'
echo '-----------------------------------------------------------'
fi
sleep 999999