-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·83 lines (68 loc) · 1.54 KB
/
entrypoint.sh
File metadata and controls
executable file
·83 lines (68 loc) · 1.54 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
if [[ -z "${TM_SERVER_NAME}" ]]
then
echo "Trackmania server name was not specified."
echo "Please consider filling the field."
fi
if [[ -z "${TM_SERVER_PWD}" ]]
then
echo "Trackmania server password was not specified."
echo "Please consider filling the field, if you are protecting your server."
fi
if [[ -z "${DATA_DIR}" ]]
then
echo "The data directory was not specified."
echo "Defaulting to ./data"
export DATA_DIR=./data
fi
if [[ -z "${SQL_HOST}" ]]
then
echo "The SQL host was not specified."
echo "Exiting..."
exit 1
fi
if [[ -z "${SQL_PORT}" ]]
then
echo "There was no implicit SQL port specified."
echo "Defaulting to 3306."
export SQL_PORT=3306
fi
if [[ -z "${SQL_USER}" ]]
then
echo "The SQL user was not specified."
echo "Exiting..."
exit 1
fi
if [[ -z "${SQL_PWD}" ]]
then
echo "The SQL password was not specified."
echo "Exiting..."
exit 1
fi
if [[ -z "${SQL_DATABASE}" ]]
then
echo "There was no SQL database specified."
echo "Exiting..."
exit 1
fi
if [[ -z "${TELEGRAM_TOKEN}" ]]
then
echo "The telegram token is missing."
echo "Exiting..."
exit 1
fi
if [[ -z "${TELEGRAM_GROUP_ID}" ]]
then
echo "The telegram group chat id is missing."
echo "Exiting..."
exit 1
fi
echo "Finished initialization"
echo "Evaluating config file"
envsubst < /var/app/_config.ini > /var/app/config.ini
echo "Printing the complete configuration:"
echo ""
cat /var/app/config.ini
# Finished with docker logs.
# Continuing to execution.
exec "$@"