-
Notifications
You must be signed in to change notification settings - Fork 0
/
urt.sh
28 lines (24 loc) · 826 Bytes
/
urt.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
#!/bin/sh
if [ ! -e /urtconfig/q3ut4/server.cfg ]; then
echo "Server config not found, using the default one..."
mkdir -p /urtconfig/q3ut4
if [ -z "${URT_RCONPASSWORD}" ]; then
export URT_RCONPASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '')
echo " "
echo "============Rcon Password=========="
echo " The rcon password is ${URT_RCONPASSWORD}"
echo "==================================="
echo " "
fi
envsubst < /data/UrbanTerror43/q3ut4/docker-server.cfg > /urtconfig/q3ut4/server.cfg
fi
## run the UrT server
echo "===== running UrT server on port ${URT_PORT} ======"
exec /data/UrbanTerror43/urbanterror-server \
+set fs_game q3ut4 \
+set fs_homepath /urtconfig/ \
+set dedicated 2 \
+set net_port ${URT_PORT} \
+exec server.cfg \
+set com_hunkmegs 128 \
2>&1