forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diagnostic
executable file
·52 lines (37 loc) · 1.15 KB
/
diagnostic
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
#!/bin/bash
MONGO_PORT=27017
REDIS_PORT=6379
LILA_PORT=9663
LILA_WS_PORT=9664
LILA_FISHNET_PORT=9665
SEPARATOR="\n\n=========================================\n\n"
echo -e "Java version: $(java --version)\n"
echo -e "SBT version: $(sbt sbtVersion)\n"
echo -e "Node version: $(node --version)\n"
echo -e $SEPARATOR
mongo 127.0.0.1:$MONGO_PORT/lichess --eval "print('ok')"
echo -e $SEPARATOR
redis-cli -h 127.0.0.1 -p $REDIS_PORT info
echo -e $SEPARATOR
LILA_STATUS=$(curl -sL -w "%{http_code}" -I "127.0.0.1:$LILA_PORT" -o /dev/null)
echo "Reaching lila..."
echo "lila: $LILA_STATUS"
if [ "$LILA_STATUS" -ne "200" ]; then
exit 1;
fi
echo -e $SEPARATOR
LILA_WS_STATUS=$(curl -sL -w "%{http_code}" -I "127.0.0.1:$LILA_WS_PORT" -o /dev/null)
echo "Reaching lila-ws..."
echo "lila-ws: $LILA_WS_STATUS"
if [ "$LILA_WS_STATUS" -ne "403" ]; then
echo "NOT STARTED"
fi
echo -e $SEPARATOR
LILA_FISHNET_STATUS=$(curl -sL -w "%{http_code}" -I "127.0.0.1:$LILA_FISHNET_PORT" -o /dev/null)
echo "Reaching lila-fishnet..."
echo "lila-fishnet: $LILA_FISHNET_STATUS"
if [ "$LILA_FISHNET_STATUS" -ne "404" ]; then
echo "NOT STARTED"
fi
echo -e $SEPARATOR
echo "You're all set"