-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
40 lines (36 loc) · 1.2 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
SetUsePerfThreads="-useperfthreads "
if [[ $UsePerfThreads == "false" ]]; then
SetUsePerfThreads=""
fi
SetNoAsyncLoadingThread="-NoAsyncLoadingThread "
if [[ $NoAsyncLoadingThread == "false" ]]; then
SetNoAsyncLoadingThread=""
fi
MaxServerPlayers="${MaxServerPlayers:-6}"
Port="${Port:-7777}"
QueryPort="${QueryPort:-27015}"
ServerPassword="${ServerPassword:-password}"
SteamServerName="${SteamServerName:-LinuxServer}"
WorldSaveName="${WorldSaveName:-Cascade}"
AdditionalArgs="${AdditionalArgs:-}"
# Check for updates/perform initial installation
if [ ! -d "/server/AbioticFactor/Binaries/Win64" ] || [[ $AutoUpdate == "true" ]]; then
steamcmd \
+@sSteamCmdForcePlatformType windows \
+force_install_dir /server \
+login anonymous \
+app_update 2857200 validate \
+quit
fi
pushd /server/AbioticFactor/Binaries/Win64 > /dev/null
WINEARCH=win64 wine AbioticFactorServer-Win64-Shipping.exe \
$SetUsePerfThreads \
$SetNoAsyncLoadingThread \
-MaxServerPlayers=$MaxServerPlayers \
-PORT=$Port \
-QueryPort=$QueryPort \
-ServerPassword=$ServerPassword \
-SteamServerName="$SteamServerName" \
-WorldSaveName="$WorldSaveName" \
$AdditionalArgs
popd > /dev/null