From c0e45126d9e81a264804f2ac733f9fc122d02e49 Mon Sep 17 00:00:00 2001 From: Lucas Briese Date: Wed, 26 Sep 2018 10:43:56 +0200 Subject: [PATCH] + added run arguments to lgsm config --- entrypoint.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 80b70a1..326dac5 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,9 +6,7 @@ set -e cd "$STEAM_PATH" #suggested -disableluarefresh -tickrate 66 +host_workshop_collection -port 27015 -export parms="-game garrysmod +gamemode terrortown "$(printf "%s " "$@") -#not needed I think: sed -i 's/parms=/#parms=/g' /home/steam/lgsm/config-lgsm/gmodserver/common.cfg -echo "starting with $parms" + if [ -e "${STEAM_PATH}/gmodserver" ]; then ./gmodserver update-lgsm @@ -27,6 +25,17 @@ echo "install & mount gamefiles" ./installAndMountAddons.sh cd "$STEAM_PATH" +export parms="-game garrysmod +gamemode terrortown "$(printf "%s " "$@") +if [ -e "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" ]; then + rm -f "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" +fi +mkdir -p "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/" +touch "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" +echo "fn_parms(){" > "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" +echo "parms="'"'"$parms"'"' >> "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" +echo "}" >> "${STEAM_PATH}/lgsm/config-lgsm/gmodserver/gmodserver.cfg" +echo "starting with $parms" + trap 'pkill -15 srcds_linux' SIGTERM ./gmodserver start ./gmodserver console