forked from theBlackDragon/conan-exiles-dedicated-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
startup.sh
executable file
·63 lines (47 loc) · 1.99 KB
/
startup.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
#!/bin/bash
PUID=${PUID:-1000}
PGID=${PGID:-1000}
groupmod -o -g "$PGID" steam
usermod -o -u "$PUID" steam
echo "
-------------------------------------
GID/UID
-------------------------------------
User uid: $(id -u steam)
User gid: $(id -g steam)
-------------------------------------
"
chown steam:steam -R /home/steam
echo "
-------------------------------------
Setting up wine
-------------------------------------
"
winetricks -q dotnet48 d3dcompiler_47 vcrun2015 allfonts
if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then
wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.3/wine_gecko-2.47.3-x86.msi
fi
if [ ! -f "$WINEPREFIX/gecko_x86_64.msi" ]; then
wget -q -O $WINEPREFIX/gecko_x86_64.msi http://dl.winehq.org/wine/wine-gecko/2.47.3/wine_gecko-2.47.3-x86_64.msi
fi
wine msiexec /i $WINEPREFIX/gecko_x86.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_install.log
wine msiexec /i $WINEPREFIX/gecko_x86_64.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_64_install.log
if [ ! -f "$WINEPREFIX/mono.msi" ]; then
wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/7.4.0/wine-mono-7.4.0-x86.msi
fi
wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log
echo "
-------------------------------------
Updating application
-------------------------------------
"
set -x
su steam -c "${STEAMCMDDIR}/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir ${STEAMAPPDIR} +login anonymous +app_update ${STEAMAPPID} validate +quit"
STEAMSERVERID=2329680
echo "
-------------------------------------
Starting server
-------------------------------------
"
#su steam -c "xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine ${STEAMAPPDIR}/WRSHServer.exe -log -nosteam -server"
su steam -c "xvfb-run --auto-servernum wine ${STEAMAPPDIR}/WRSHServer.exe ${NOS_ARGS}"