-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
67 lines (52 loc) · 1.36 KB
/
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
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
#!/bin/sh
args=""
if [ -n $SALT ]; then
args="$args --salt=$SALT"
echo Salt set to $SALT
fi
if [ -n "$PORT" ]; then
args="$args --port=$PORT"
echo Port set to $PORT
fi
if [ "$ISOLATE" == "TRUE" ]; then
args="$args --isolate-rooms"
echo Rooms Isolated
fi
if [ "$DISABLEREADY" == "TRUE" ]; then
args="$args --disable-ready"
echo Readiness Indicator Disabled
fi
if [ "$DISABLECHAT" == "TRUE" ]; then
args="$args --disable-chat"
echo Chat Disabled
fi
if [ -n "$MAXCHATLENGTH" ]; then
args="$args --max-chat-message-length=$MAXCHATLENGTH"
echo Max Chat Message Length set to $MAXCHATLENGTH
fi
if [ -n "$MAXUNAMELENGTH" ]; then
args="$args --max-username-length=$MAXUNAMELENGTH"
echo Max Username Length set to $MAXUNAMELENGTH
fi
if [ "$MOTD" == "TRUE" ]; then
args="$args --motd-file=/config/motd.txt"
echo MOTD Enabled
fi
if [ -n "$PASSWORD" ]; then
args="$args --password=$PASSWORD"
echo Password set to $PASSWORD
fi
if [ "$TLS" == "TRUE" ]; then
args="$args --tls=/config/certs"
echo Certs Enabled
fi
if [ "$ROOMS_DB" == "TRUE" ]; then
# Will not work if using --isolate-rooms.
args="$args --rooms-db-file=/config/rooms.db"
echo Room Persistence Enabled
fi
if [ "$PERMANENT_ROOMS" == "TRUE" ]; then
args="$args --permanent-rooms-file=/config/rooms.txt"
echo Permanent Rooms Enabled
fi
PYTHONUNBUFFERED=1 exec syncplay-server $args $@