Skip to content

Commit b782ac0

Browse files
fix(entrypoint): steamcmd path, optional system libraries (#5)
1 parent a364292 commit b782ac0

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

entrypoint.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,24 @@
44
# Variables
55
# GAME_PATH - Root game path
66
# STEAMCMD_PATH - SteamCMD path
7+
# USE_SYS_LIBS - Use system libraries instead of the ones created by steamcmd
78
#
89
##
910

11+
# CLI
1012
if [ -z ${GAME_PATH} ];
1113
then
1214
export GAME_PATH=/home/container;
1315
fi
1416

1517
if [ -z ${STEAMCMD_PATH} ];
1618
then
17-
export STEAMCMD_PATH="$GAME_PATH";
19+
export STEAMCMD_PATH="${GAME_PATH}/steamcmd";
20+
fi
21+
22+
if [ -z ${USE_SYS_LIBS} ];
23+
then
24+
export USE_SYS_LIBS="true"
1825
fi
1926

2027
cd "$GAME_PATH"
@@ -28,17 +35,18 @@ export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
2835
if [ ! -z ${SRCDS_APPID} ]; then
2936
if [ ! -z ${SRCDS_BETAID} ]; then
3037
if [ ! -z ${SRCDS_BETAPASS} ]; then
31-
./$STEAMCMD_PATH/steamcmd/steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} -beta ${SRCDS_BETAID} -betapassword ${SRCDS_BETAPASS} +quit
38+
$STEAMCMD_PATH/./steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} -beta ${SRCDS_BETAID} -betapassword ${SRCDS_BETAPASS} +quit
3239
else
33-
./$STEAMCMD_PATH/steamcmd/steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} -beta ${SRCDS_BETAID} +quit
40+
$STEAMCMD_PATH/./steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} -beta ${SRCDS_BETAID} +quit
3441
fi
3542
else
36-
./$STEAMCMD_PATH/steamcmd/steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} +quit
43+
$STEAMCMD_PATH/./steamcmd.sh +login anonymous +force_install_dir "$GAME_PATH" +app_update ${SRCDS_APPID} +quit
3744
fi
3845
fi
3946

40-
# Use system libraries
41-
rm "${GAME_PATH}/bin/libstdc++.so.6" | true
47+
if [ "$USE_SYS_LIBS" = "true" ]; then
48+
rm "${GAME_PATH}/bin/libstdc++.so.6" | true
49+
fi
4250

4351
# Replace Startup Variables
4452
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`

0 commit comments

Comments
 (0)