-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
37 lines (33 loc) · 978 Bytes
/
entrypoint.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
#!/bin/sh
set -euo pipefail
bindir="/usr/local/bin"
basedir="/armagetronad"
datadir="${basedir}/data"
userdatadir="${basedir}/userdata"
configdir="${basedir}/config"
userconfigdir="${basedir}/userconfig"
resourcedir="${basedir}/resource"
autoresourcedir="${basedir}/autoresource"
vardir="${basedir}/var"
touch ${vardir}/input.txt
if [ -z ${MASTERSERVER+x} ]; then
set -- "${bindir}/armagetronad-dedicated" \
--datadir ${datadir} \
--userdatadir ${userdatadir} \
--configdir ${configdir} \
--userconfigdir ${userconfigdir} \
--resourcedir ${resourcedir} \
--autoresourcedir ${autoresourcedir} \
--vardir ${vardir} \
--input ${vardir}/input.txt
else
set -- "${bindir}/armagetronad-master" \
--datadir ${datadir} \
--userdatadir ${userdatadir} \
--configdir ${configdir} \
--userconfigdir ${userconfigdir} \
--resourcedir ${resourcedir} \
--autoresourcedir ${autoresourcedir} \
--vardir ${vardir}
fi
exec "$@"