forked from OpenRA/OpenRA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
launch-dedicated.sh
executable file
·58 lines (49 loc) · 2.13 KB
/
launch-dedicated.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
#!/bin/sh
# example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated-Server for details
# Usage:
# $ ./launch-dedicated.sh # Launch a dedicated server with default settings
# $ Mod="d2k" ./launch-dedicated.sh # Launch a dedicated server with default settings but override the Mod
# Read the file to see which settings you can override
set -o errexit || exit $?
ENGINEDIR=$(dirname "$0")
if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/bin/OpenRA.Server.dll")" = "0" ]; then
RUNTIME_LAUNCHER="mono --debug"
else
RUNTIME_LAUNCHER="dotnet"
fi
Name="${Name:-"Dedicated Server"}"
Mod="${Mod:-"ra"}"
Map="${Map:-""}"
ListenPort="${ListenPort:-"1234"}"
AdvertiseOnline="${AdvertiseOnline:-"True"}"
Password="${Password:-""}"
RecordReplays="${RecordReplays:-"False"}"
RequireAuthentication="${RequireAuthentication:-"False"}"
ProfileIDBlacklist="${ProfileIDBlacklist:-""}"
ProfileIDWhitelist="${ProfileIDWhitelist:-""}"
EnableSingleplayer="${EnableSingleplayer:-"False"}"
EnableSyncReports="${EnableSyncReports:-"False"}"
EnableGeoIP="${EnableGeoIP:-"True"}"
EnableLintChecks="${EnableLintChecks:-"True"}"
ShareAnonymizedIPs="${ShareAnonymizedIPs:-"True"}"
FloodLimitJoinCooldown="${FloodLimitJoinCooldown:-"5000"}"
SupportDir="${SupportDir:-""}"
while true; do
${RUNTIME_LAUNCHER} "${ENGINEDIR}/bin/OpenRA.Server.dll" Engine.EngineDir=".." Game.Mod="$Mod" \
Server.Name="$Name" \
Server.Map="$Map" \
Server.ListenPort="$ListenPort" \
Server.AdvertiseOnline="$AdvertiseOnline" \
Server.EnableSingleplayer="$EnableSingleplayer" \
Server.Password="$Password" \
Server.RecordReplays="$RecordReplays" \
Server.RequireAuthentication="$RequireAuthentication" \
Server.ProfileIDBlacklist="$ProfileIDBlacklist" \
Server.ProfileIDWhitelist="$ProfileIDWhitelist" \
Server.EnableSyncReports="$EnableSyncReports" \
Server.EnableGeoIP="$EnableGeoIP" \
Server.EnableLintChecks="$EnableLintChecks" \
Server.ShareAnonymizedIPs="$ShareAnonymizedIPs" \
Server.FloodLimitJoinCooldown="$FloodLimitJoinCooldown" \
Engine.SupportDir="$SupportDir" || :
done