From 1733723192c197cc44da34380d811e00e83188dc Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 21 Aug 2018 20:11:36 +0100 Subject: [PATCH 01/55] Fixed OpenTTD so that it builds --- openttd/Dockerfile | 38 +++++++++++++++++++++++++------------- openttd/download.sh | 8 ++++---- openttd/start-openttd.sh | 2 +- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 2968005..3febac7 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -1,19 +1,31 @@ FROM base -RUN apt-get install -y libsdl1.2debian -RUN apt-get install -y libfontconfig1 +RUN apt-get update && \ + apt-get install -y libsdl1.2debian \ + libfontconfig1 && \ + adduser openttd && \ + mkdir -p /home/openttd/extract && \ + chown -R openttd:openttd /home/openttd/extract -RUN adduser openttd && mkdir -p /openttd/extract && chown -R openttd:openttd /openttd -WORKDIR /openttd +USER openttd +WORKDIR /home/openttd -ADD opengfx*.zip openmsx*.zip opensfx*.zip openttd*.tar.gz /openttd/ -RUN mv openttd-*-linux-generic-amd64/* . -RUN unzip openmsx*.zip -d /openttd/extract/ -RUN unzip opensfx*.zip -d /openttd/extract/ -RUN unzip opengfx*.zip -d /openttd/extract/ && tar -xf /openttd/extract/opengfx*.tar -C /openttd/extract/ -RUN mv --no-clobber /openttd/extract/*/* /openttd/baseset/ +ADD download.sh . -RUN chown -R openttd:openttd /openttd -USER openttd +RUN ./download.sh && \ + mkdir -p baseset/opengfx/ && \ + mkdir -p baseset/openmsx/ && \ + mkdir -p baseset/opensfx/ && \ + tar -xf openttd-*-linux-generic-amd64.tar.gz -C extract/ && \ + mv --no-clobber extract/openttd-*-linux-generic-amd64/* . && \ + unzip 'opengfx*.zip' -d extract/ && \ + tar -xf extract/opengfx-*.tar -C extract/ && \ + mv --no-clobber extract/opengfx-*/* baseset/opengfx/ && \ + unzip 'openmsx*.zip' -d extract/ && \ + mv --no-clobber extract/openmsx-*/* baseset/openmsx/ && \ + unzip 'opensfx*.zip' -d extract/ && \ + mv --no-clobber extract/opensfx-*/* baseset/opensfx/ + +ADD start-openttd.sh /home/openttd/start-openttd.sh -CMD ["./start-openttd.sh"] \ No newline at end of file +ENTRYPOINT ["./start-openttd.sh"] diff --git a/openttd/download.sh b/openttd/download.sh index 3abd9fd..fb63058 100755 --- a/openttd/download.sh +++ b/openttd/download.sh @@ -3,7 +3,7 @@ ls openttd*-linux-generic-amd64.tar.gz || ( BINURL=$(curl https://www.openttd.org/en/download-stable | egrep -o "\/\/binaries.openttd.org/releases/.*/openttd-.*-linux-generic-amd64.tar.gz") [[ -z "$BINURL" ]] && echo "failed to get binary URL" && exit 1 - + wget https:$BINURL ) @@ -11,14 +11,14 @@ ls openttd*-linux-generic-amd64.tar.gz || ( ls opengfx*-all.zip || ( BINURL=$(curl https://www.openttd.org/en/download-opengfx | egrep -o "\/\/binaries.openttd.org/extra/opengfx/.*/opengfx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get gfx URL" && exit 2 - + wget https:$BINURL ) ls opensfx*-all.zip || ( BINURL=$(curl http://www.openttd.org/en/download-opensfx | egrep -o "\/\/binaries.openttd.org/extra/opensfx/.*/opensfx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get sfx URL" && exit 3 - + wget https:$BINURL ) @@ -26,6 +26,6 @@ ls opensfx*-all.zip || ( ls openmsx*-all.zip || ( BINURL=$(curl http://www.openttd.org/en/download-openmsx | egrep -o "\/\/binaries.openttd.org/extra/openmsx/.*/openmsx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get msx URL" && exit 4 - + wget https:$BINURL ) diff --git a/openttd/start-openttd.sh b/openttd/start-openttd.sh index f52c160..2664647 100755 --- a/openttd/start-openttd.sh +++ b/openttd/start-openttd.sh @@ -2,4 +2,4 @@ # TODO: add config options and things here -exec ./openttd -D \ No newline at end of file +exec ./openttd -D From 03b75adef7ea0225f6b63fbcf2773b4f58723e1d Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 21 Aug 2018 21:27:51 +0100 Subject: [PATCH 02/55] Functional OpenTTD configuration --- openttd/start-openttd.sh | 83 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/openttd/start-openttd.sh b/openttd/start-openttd.sh index 2664647..e3da9f5 100755 --- a/openttd/start-openttd.sh +++ b/openttd/start-openttd.sh @@ -1,5 +1,86 @@ #!/bin/bash -# TODO: add config options and things here +# for more see https://wiki.openttd.org/Openttd.cfg + +# [network] +[[ -z $SERVER_NAME ]] && SERVER_NAME="OpenTTD Server" +[[ -n $SERVER_PASSWORD ]] && SERVER_PASSWORD="$SERVER_PASSWORD" +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $ADMIN_PASSWORD ]] && ADMIN_PASSWORD="$ADMIN_PASSWORD" +[[ -z $MIN_ACTIVE_CLIENTS ]] && MIN_ACTIVE_CLIENTS=1 + +# [vehicle] +[[ -z $MAX_TRAINS ]] && MAX_TRAINS=5000 +[[ -z $MAX_ROADVEH ]] && MAX_ROADVEH=5000 +[[ -z $MAX_AIRCRAFT ]] && MAX_AIRCRAFT=5000 +[[ -z $MAX_SHIPS ]] && MAX_SHIPS=5000 +[[ -z $ROAD_SIDE ]] && ROAD_SIDE=right +[[ -z $ROADVEH_ACCELERATION_MODEL ]] && ROADVEH_ACCELERATION_MODEL=1 +[[ -z $TRAIN_ACCELERATION_MODEL ]] && TRAIN_ACCELERATION_MODEL=1 + +# [linkgraph] +[[ -z $DISTRIBUTION_PAX ]] && DISTRIBUTION_PAX=1 +[[ -z $DISTRIBUTION_MAIL ]] && DISTRIBUTION_MAIL=1 +[[ -z $DISTRIBUTION_ARMOURED ]] && DISTRIBUTION_ARMOURED=1 +[[ -z $DISTRIBUTION_DEFAULT ]] && DISTRIBUTION_DEFAULT=1 + +# [locale] +[[ -z $CURRENCY ]] && CURRENCY=EUR + +# [difficulty] +[[ -z $DISASTERS ]] && DISASTERS=false +[[ -z $TERRAIN_TYPE ]] && TERRAIN_TYPE=temperate +[[ -z $MAX_NO_COMPETITORS ]] && MAX_NO_COMPETITORS=0 + +# [game_creation] +[[ -z $MAP_X ]] && MAP_X=9 +[[ -z $MAP_Y ]] && MAP_Y=9 +[[ -z $STARTING_YEAR ]] && STARTING_YEAR=1970 +[[ -z $LANDSCAPE ]] && $LANDSCAPE=temperate + +# [gui] +[[ -z $AUTOSAVE ]] && AUTOSAVE=yearly + +mkdir -p /home/openttd/.openttd/ +cat </home/openttd/.openttd/openttd.cfg +[network] +server_name = $SERVER_NAME +server_password = $SERVER_PASSWORD +rcon_password = $RCON_PASSWORD +admin_password = $ADMIN_PASSWORD +min_active_clients = $MIN_ACTIVE_CLIENTS + +[vehicle] +max_trains = $MAX_TRAINS +max_roadveh = $MAX_ROADVEH +max_aircraft = $MAX_AIRCRAFT +max_ships = $MAX_SHIPS +road_side = $ROAD_SIDE +roadveh_acceleration_model = $ROADVEH_ACCELERATION_MODEL +train_acceleration_model = $TRAIN_ACCELERATION_MODEL + +[linkgraph] +distribution_pax = $DISTRIBUTION_PAX +distribution_mail = $DISTRIBUTION_MAIL +distribution_armoured = $DISTRIBUTION_ARMOURED +distribution_default = $DISTRIBUTION_DEFAULT + +[locale] +currency = $CURRENCY + +[difficulty] +disasters = $DISASTERS +terrain_type = $TERRAIN_TYPE +max_no_competitors = $MAX_NO_COMPETITORS + +[game_creation] +landscape = $LANDSCAPE +map_x = $MAP_X +map_y = $MAP_Y +starting_year = $STARTING_YEAR + +[gui] +autosave = $AUTOSAVE +EOF exec ./openttd -D From bfd569a8011c19e956fbd49b7b1cc701b375f201 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 21 Aug 2018 21:31:08 +0100 Subject: [PATCH 03/55] Minor space formatting --- openttd/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 3febac7..6763e7d 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -14,17 +14,17 @@ ADD download.sh . RUN ./download.sh && \ mkdir -p baseset/opengfx/ && \ - mkdir -p baseset/openmsx/ && \ - mkdir -p baseset/opensfx/ && \ + mkdir -p baseset/openmsx/ && \ + mkdir -p baseset/opensfx/ && \ tar -xf openttd-*-linux-generic-amd64.tar.gz -C extract/ && \ mv --no-clobber extract/openttd-*-linux-generic-amd64/* . && \ unzip 'opengfx*.zip' -d extract/ && \ tar -xf extract/opengfx-*.tar -C extract/ && \ mv --no-clobber extract/opengfx-*/* baseset/opengfx/ && \ unzip 'openmsx*.zip' -d extract/ && \ - mv --no-clobber extract/openmsx-*/* baseset/openmsx/ && \ + mv --no-clobber extract/openmsx-*/* baseset/openmsx/ && \ unzip 'opensfx*.zip' -d extract/ && \ - mv --no-clobber extract/opensfx-*/* baseset/opensfx/ + mv --no-clobber extract/opensfx-*/* baseset/opensfx/ ADD start-openttd.sh /home/openttd/start-openttd.sh From 98e257b439c2fbdebdde7b2757286f6dd7464a20 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 22 Aug 2018 16:26:01 +0100 Subject: [PATCH 04/55] Add Left4Dead2 metamod --- l4d2-metamod/Dockerfile | 15 +++++++++++++++ l4d2-metamod/build.sh | 3 +++ l4d2-metamod/download.sh | 17 +++++++++++++++++ l4d2-metamod/metamod.vdf | 5 +++++ l4d2-metamod/start-l4d2.sh | 33 +++++++++++++++++++++++++++++++++ l4d2/Dockerfile | 7 ++++++- l4d2/start-l4d2.sh | 19 ++++++++++--------- 7 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 l4d2-metamod/Dockerfile create mode 100755 l4d2-metamod/build.sh create mode 100755 l4d2-metamod/download.sh create mode 100644 l4d2-metamod/metamod.vdf create mode 100755 l4d2-metamod/start-l4d2.sh diff --git a/l4d2-metamod/Dockerfile b/l4d2-metamod/Dockerfile new file mode 100644 index 0000000..92ea2c4 --- /dev/null +++ b/l4d2-metamod/Dockerfile @@ -0,0 +1,15 @@ +FROM l4d2 + +WORKDIR /steam/l4d2/ +USER steam +ADD download.sh . +RUN ./download.sh + +RUN tar -xf mm*.tar.gz -C left4dead2/ && \ + tar -xf sourcemod*.tar.gz -C left4dead2/ + +ADD metamod.vdf left4dead2/ + +ADD start-l4d2.sh . + +ENTRYPOINT ["./start-l4d2.sh"] diff --git a/l4d2-metamod/build.sh b/l4d2-metamod/build.sh new file mode 100755 index 0000000..7cabd8e --- /dev/null +++ b/l4d2-metamod/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build l4d2-metamod diff --git a/l4d2-metamod/download.sh b/l4d2-metamod/download.sh new file mode 100755 index 0000000..89bcc7e --- /dev/null +++ b/l4d2-metamod/download.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +MMVERSION=$( curl http://www.metamodsource.net/downloads.php | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) + +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) + +curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) + +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") + +echo $SMVERSION +echo $SMMAJORVERSION + +SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +curl -o $SMVERSION $SMURL diff --git a/l4d2-metamod/metamod.vdf b/l4d2-metamod/metamod.vdf new file mode 100644 index 0000000..9a55ffd --- /dev/null +++ b/l4d2-metamod/metamod.vdf @@ -0,0 +1,5 @@ +"Plugin" +{ + "file" "../left4dead2/addons/metamod/bin/server" +} + diff --git a/l4d2-metamod/start-l4d2.sh b/l4d2-metamod/start-l4d2.sh new file mode 100755 index 0000000..80111c4 --- /dev/null +++ b/l4d2-metamod/start-l4d2.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 +[[ -z "$MAP" ]] && MAP="c1m4_atrium" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" +[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" + +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - MetaMod" +[[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="4" + +# mp config + +# Create config file +cat </steam/l4d2/left4dead2/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +l4d_maxplayers $MAXPLAYERS +sm_cvar l4d_maxplayers $MAXPLAYERS +l4d_survivor_limit $VERSUS_TEAM_LIMIT +sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT +l4d_infected_limit $VERSUS_TEAM_LIMIT +sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT +EOF + +echo '"$FULL_ADMINS" "@Full Admins"' > left4dead2/addons/sourcemod/configs/admins_simple.ini + +exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 0342b6b..251ec8e 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -10,7 +10,12 @@ RUN mkdir -p /steam/l4d2 WORKDIR /steam/steamcmd_linux RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit +ARG CACHE_DATE +# do another update to catch updates since the original image was built +# need to run docker build --build-arg CACHE_DATE="$(date)" +RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit + WORKDIR /steam/l4d2/ ADD start*.sh . -CMD ["./start-l4d2.sh"] +ENTRYPOINT ["./start-l4d2.sh"] diff --git a/l4d2/start-l4d2.sh b/l4d2/start-l4d2.sh index 6099af5..2c13778 100755 --- a/l4d2/start-l4d2.sh +++ b/l4d2/start-l4d2.sh @@ -2,21 +2,22 @@ # local vars [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" -[[ -z "$GAME_MODE" ]] && GAME_MODE="versus" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" # Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="L4D2 Server" +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2" + +# mp config # Create config file cat </steam/l4d2/left4dead2/cfg/server.cfg -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD EOF -# Run dedicated server -exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon +mp_gamemode $GAME_MODE +sv_gametypes $GAME_MODE -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ +exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 179e0be71afb600330de046344d688317d41d21d Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 22 Aug 2018 23:29:43 +0100 Subject: [PATCH 05/55] Add Insurgency --- insurgency/Dockerfile | 20 +++++++++++ insurgency/build.sh | 3 ++ insurgency/start_insurgency.sh | 61 ++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 insurgency/Dockerfile create mode 100755 insurgency/build.sh create mode 100755 insurgency/start_insurgency.sh diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile new file mode 100644 index 0000000..b580dcc --- /dev/null +++ b/insurgency/Dockerfile @@ -0,0 +1,20 @@ +FROM steamcmd + +USER root + +USER steam +WORKDIR /steam/steamcmd_linux +RUN mkdir -p /steam/insurgency2 + +RUN ./steamcmd.sh +login anonymous +force_install_dir ../insurgency2 +app_update 237410 +quit + +ARG CACHE_DATE +# do another update to catch updates since the original image was built +# need to run docker build --build-arg CACHE_DATE="$(date)" +RUN ./steamcmd.sh +login anonymous +force_install_dir ../insurgency2 +app_update 237410 +quit + +ADD start_insurgency.sh /steam/insurgency2/ + +WORKDIR /steam/insurgency2 + +ENTRYPOINT ["./start_insurgency.sh"] diff --git a/insurgency/build.sh b/insurgency/build.sh new file mode 100755 index 0000000..aaa95e8 --- /dev/null +++ b/insurgency/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build insurgency diff --git a/insurgency/start_insurgency.sh b/insurgency/start_insurgency.sh new file mode 100755 index 0000000..7084717 --- /dev/null +++ b/insurgency/start_insurgency.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -n $MAXPLAYERS ]] && MAXPLAYERS="$MAXPLAYERS" + +[[ -z $RCON_PASSWORD ]] && RCON_PASSWORD="changeme" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD=$SV_PASSWORD + +supportedGamemodes=( +ambush +checkpoint +conquer +firefight +flashpoint +hunt +infiltrate +occupy +outpost +push +skirmish +strike +survival +) + +gamemodeSupported="false" +for i in "${supportedGamemodes[@]}" +do + if [ "$i" = "$GAME_MODE" ] ; then + gamemodeSupported="true" + break + fi +done + +[[ -z $GAME_MODE ]] && GAME_MODE=conquer + +if [ "$gamemodeSupported" = "true" ] ; then + printf "Configuring server for $GAME_MODE.\n" +else + printf "Unsupported game mode! Defaulting to conquer. Ignore this message if MAPCYCLEFILE and SERVER_CFG are customized.\n" + GAME_MODE=conquer +fi + +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Insurgency - $GAME_MODE" + +[[ -z $MAPCYCLEFILE ]] && MAPCYCLEFILE=mapcycle_"$GAME_MODE".txt +[[ -z $SERVER_CFG ]] && SERVER_CFG=default_server_"$GAME_MODE".cfg + +printf "Using mapcyclefile $MAPCYCLEFILE\n" +printf "Using servercfg $SERVER_CFG\n" + +[[ -z $MAP ]] && MAP="$(head -1 /steam/insurgency2/insurgency/$MAPCYCLEFILE)" + +cat </steam/insurgency2/insurgency/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD + +"mapcyclefile" "$MAPCYCLEFILE" +EOF + +exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 +exec $SERVER_CFG From f8ddd43a53775aefa321740b9f5688c5fd4c61c3 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 22 Aug 2018 23:39:05 +0100 Subject: [PATCH 06/55] Add readme --- insurgency/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 insurgency/README.md diff --git a/insurgency/README.md b/insurgency/README.md new file mode 100644 index 0000000..6e79efd --- /dev/null +++ b/insurgency/README.md @@ -0,0 +1,28 @@ +# Insurgency + +Supports the following default configurations by setting environment variable `GAME_MODE`: + +* ambush +* checkpoint +* conquer +* firefight +* flashpoint +* hunt +* infiltrate +* occupy +* outpost +* push +* skirmish +* strike +* survival + +Other configurable environment variables: + +* SV_HOSTNAME +* SV_PASSWORD +* RCON_PASSWORD +* LAN (0 is not, 1 is LAN) +* MAXPLAYERS (humans + bots) +* MAPCYCLEFILE (look at your local steamapps\common\insurgency2\insurgency) +* SERVER_CFG (look at your local steamapps\common\insurgency2\insurgency\cfg) +* MAP (map gametype e.g. market skirmish) From b31559f00d63a2fd232b632a26e88c7fff5e8482 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 23 Aug 2018 22:52:49 +0100 Subject: [PATCH 07/55] Add GunGame and Hide+Seek --- css-gungame/Dockerfile | 15 +++++++++++++++ css-gungame/build.sh | 3 +++ css-gungame/download.sh | 3 +++ css-gungame/start-css.sh | 23 +++++++++++++++++++++++ css-hideandseek/Dockerfile | 15 +++++++++++++++ css-hideandseek/build.sh | 3 +++ css-hideandseek/download.sh | 3 +++ css-hideandseek/start-css.sh | 23 +++++++++++++++++++++++ 8 files changed, 88 insertions(+) create mode 100644 css-gungame/Dockerfile create mode 100755 css-gungame/build.sh create mode 100755 css-gungame/download.sh create mode 100755 css-gungame/start-css.sh create mode 100644 css-hideandseek/Dockerfile create mode 100755 css-hideandseek/build.sh create mode 100755 css-hideandseek/download.sh create mode 100755 css-hideandseek/start-css.sh diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile new file mode 100644 index 0000000..09a69e8 --- /dev/null +++ b/css-gungame/Dockerfile @@ -0,0 +1,15 @@ +FROM css-metamod + +USER steam + +WORKDIR /steam/css/cstrike + +ADD download.sh . +RUN ./download.sh && \ + unzip sm_gungame.zip + +WORKDIR /steam/css + +ADD start-css.sh . + +ENTRYPOINT [ "./start-css.sh" ] diff --git a/css-gungame/build.sh b/css-gungame/build.sh new file mode 100755 index 0000000..f64370d --- /dev/null +++ b/css-gungame/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build css-gungame diff --git a/css-gungame/download.sh b/css-gungame/download.sh new file mode 100755 index 0000000..6a5e4bd --- /dev/null +++ b/css-gungame/download.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' diff --git a/css-gungame/start-css.sh b/css-gungame/start-css.sh new file mode 100755 index 0000000..90efe74 --- /dev/null +++ b/css-gungame/start-css.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z "$MAP" ]] && MAP="de_dust2" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" +[[ -z $SERVER_NUM ]] && SERVER_NUM="1" + +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Gungame)" + +# Create config file +cat </steam/css/cstrike/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +EOF + +echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini + +exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css-hideandseek/Dockerfile b/css-hideandseek/Dockerfile new file mode 100644 index 0000000..5f650f6 --- /dev/null +++ b/css-hideandseek/Dockerfile @@ -0,0 +1,15 @@ +FROM css-metamod + +USER steam + +WORKDIR /steam/css/cstrike + +ADD download.sh . +RUN ./download.sh + +RUN unzip sm_hideandseek.zip +WORKDIR /steam/css + +ADD start-css.sh . + +ENTRYPOINT [ "./start-css.sh" ] diff --git a/css-hideandseek/build.sh b/css-hideandseek/build.sh new file mode 100755 index 0000000..269b34a --- /dev/null +++ b/css-hideandseek/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build css-hideandseek diff --git a/css-hideandseek/download.sh b/css-hideandseek/download.sh new file mode 100755 index 0000000..79f274f --- /dev/null +++ b/css-hideandseek/download.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +curl -o sm_hideandseek.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=91862&d=1315059433' diff --git a/css-hideandseek/start-css.sh b/css-hideandseek/start-css.sh new file mode 100755 index 0000000..aa75387 --- /dev/null +++ b/css-hideandseek/start-css.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z "$MAP" ]] && MAP="cs_office" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" +[[ -z $SERVER_NUM ]] && SERVER_NUM="1" + +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Hide and Seek)" + +# Create config file +cat </steam/css/cstrike/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +EOF + +echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini + +exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 8e23c2097be3db509cce3bb69bcc2c10e5907839 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Sun, 26 Aug 2018 00:03:48 +0100 Subject: [PATCH 08/55] Add ABM --- l4d2-abm/Dockerfile | 9 +++++++++ l4d2-abm/build.sh | 3 +++ l4d2-abm/download.sh | 4 ++++ l4d2-abm/start-l4d2.sh | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 l4d2-abm/Dockerfile create mode 100755 l4d2-abm/build.sh create mode 100755 l4d2-abm/download.sh create mode 100755 l4d2-abm/start-l4d2.sh diff --git a/l4d2-abm/Dockerfile b/l4d2-abm/Dockerfile new file mode 100644 index 0000000..dc8d316 --- /dev/null +++ b/l4d2-abm/Dockerfile @@ -0,0 +1,9 @@ +FROM l4d2-metamod + +WORKDIR /steam/l4d2/ +USER steam +ADD download.sh . +RUN ./download.sh + +ADD start-l4d2.sh . +ENTRYPOINT ["./start-l4d2.sh"] diff --git a/l4d2-abm/build.sh b/l4d2-abm/build.sh new file mode 100755 index 0000000..02a799c --- /dev/null +++ b/l4d2-abm/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build l4d2-abm diff --git a/l4d2-abm/download.sh b/l4d2-abm/download.sh new file mode 100755 index 0000000..4dff80a --- /dev/null +++ b/l4d2-abm/download.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/abm.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=168280&d=1517350697' +curl -o /steam/l4d2/left4dead2/addons/sourcemod/gamedata/abm.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=168279&d=1517350697' diff --git a/l4d2-abm/start-l4d2.sh b/l4d2-abm/start-l4d2.sh new file mode 100755 index 0000000..40d18eb --- /dev/null +++ b/l4d2-abm/start-l4d2.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 +[[ -z "$MAP" ]] && MAP="c1m4_atrium" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="16" +[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" + +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - ABM Mod" +[[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="8" + +# mp config + +# Create config file +cat </steam/l4d2/left4dead2/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +l4d_maxplayers $MAXPLAYERS +sm_cvar l4d_maxplayers $MAXPLAYERS +l4d_survivor_limit $VERSUS_TEAM_LIMIT +sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT +l4d_infected_limit $VERSUS_TEAM_LIMIT +sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT +EOF + +echo '"$FULL_ADMINS" "@Full Admins"' > left4dead2/addons/sourcemod/configs/admins_simple.ini + +exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 5f37157a7c80b60a1211e490346d76c415058a8b Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Sun, 26 Aug 2018 00:19:01 +0100 Subject: [PATCH 09/55] Change FULL_ADMINS variable (doesn't seem to work) --- l4d2-metamod/start-l4d2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l4d2-metamod/start-l4d2.sh b/l4d2-metamod/start-l4d2.sh index 80111c4..7791871 100755 --- a/l4d2-metamod/start-l4d2.sh +++ b/l4d2-metamod/start-l4d2.sh @@ -28,6 +28,6 @@ l4d_infected_limit $VERSUS_TEAM_LIMIT sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT EOF -echo '"$FULL_ADMINS" "@Full Admins"' > left4dead2/addons/sourcemod/configs/admins_simple.ini +echo '$FULL_ADMINS' > left4dead2/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 35b69cfebebfc65acd20bfad177e783b8992f511 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 15:35:43 +0100 Subject: [PATCH 10/55] Add L4DToolZ and mission changer plugins Also simplified FULL_ADMINS --- l4d2-abm/Dockerfile | 2 ++ l4d2-abm/download.sh | 10 ++++++++++ l4d2-abm/start-l4d2.sh | 17 ++++++++++------- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/l4d2-abm/Dockerfile b/l4d2-abm/Dockerfile index dc8d316..8c58ded 100644 --- a/l4d2-abm/Dockerfile +++ b/l4d2-abm/Dockerfile @@ -3,7 +3,9 @@ FROM l4d2-metamod WORKDIR /steam/l4d2/ USER steam ADD download.sh . + RUN ./download.sh +RUN unzip l4dtoolz.zip -d /steam/l4d2/left4dead2/addons ADD start-l4d2.sh . ENTRYPOINT ["./start-l4d2.sh"] diff --git a/l4d2-abm/download.sh b/l4d2-abm/download.sh index 4dff80a..2fde132 100755 --- a/l4d2-abm/download.sh +++ b/l4d2-abm/download.sh @@ -1,4 +1,14 @@ #!/bin/bash +# ABM: A MultiSlots / SuperVersus Alternative +# https://forums.alliedmods.net/showthread.php?p=1984946#post1984946 curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/abm.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=168280&d=1517350697' curl -o /steam/l4d2/left4dead2/addons/sourcemod/gamedata/abm.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=168279&d=1517350697' + +# Force Mission Changer + Voting System (Rewritten) +# https://forums.alliedmods.net/showthread.php?p=2409561 +curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/fmc+vs-l4d2.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=165897&d=1507128318' + +# L4DToolZ Metamod plugin (l4d1 & l4d2) +# https://forums.alliedmods.net/showthread.php?t=93600 +curl -o l4dtoolz.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=122230&d=1373147952' diff --git a/l4d2-abm/start-l4d2.sh b/l4d2-abm/start-l4d2.sh index 40d18eb..3263461 100755 --- a/l4d2-abm/start-l4d2.sh +++ b/l4d2-abm/start-l4d2.sh @@ -20,14 +20,17 @@ cat </steam/l4d2/left4dead2/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD -l4d_maxplayers $MAXPLAYERS -sm_cvar l4d_maxplayers $MAXPLAYERS -l4d_survivor_limit $VERSUS_TEAM_LIMIT -sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT -l4d_infected_limit $VERSUS_TEAM_LIMIT -sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT +sm_cvar sv_maxplayers $MAX_PLAYERS +sm_cvar sv_removehumanlimit 1 +sm_cvar sv_force_unreserved 1 +sm_cvar fmc+vs_l4d(2)_enable 1 EOF -echo '"$FULL_ADMINS" "@Full Admins"' > left4dead2/addons/sourcemod/configs/admins_simple.ini +#sm_cvar l4d_maxplayers $MAXPLAYERS +#sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT +#sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT + + +echo $FULL_ADMINS > left4dead2/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 43aad58a1f22fd41df245617b7fabd6781232ef6 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 15:52:46 +0100 Subject: [PATCH 11/55] Rename l4d2-abm to l4d2-moreslots --- l4d2-abm/build.sh | 3 --- {l4d2-abm => l4d2-moreslots}/Dockerfile | 0 l4d2-moreslots/README.md | 19 +++++++++++++++++++ l4d2-moreslots/build.sh | 3 +++ {l4d2-abm => l4d2-moreslots}/download.sh | 2 +- {l4d2-abm => l4d2-moreslots}/start-l4d2.sh | 7 +------ 6 files changed, 24 insertions(+), 10 deletions(-) delete mode 100755 l4d2-abm/build.sh rename {l4d2-abm => l4d2-moreslots}/Dockerfile (100%) create mode 100644 l4d2-moreslots/README.md create mode 100755 l4d2-moreslots/build.sh rename {l4d2-abm => l4d2-moreslots}/download.sh (92%) rename {l4d2-abm => l4d2-moreslots}/start-l4d2.sh (82%) diff --git a/l4d2-abm/build.sh b/l4d2-abm/build.sh deleted file mode 100755 index 02a799c..0000000 --- a/l4d2-abm/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build l4d2-abm diff --git a/l4d2-abm/Dockerfile b/l4d2-moreslots/Dockerfile similarity index 100% rename from l4d2-abm/Dockerfile rename to l4d2-moreslots/Dockerfile diff --git a/l4d2-moreslots/README.md b/l4d2-moreslots/README.md new file mode 100644 index 0000000..8ca86bd --- /dev/null +++ b/l4d2-moreslots/README.md @@ -0,0 +1,19 @@ +# Left 4 Dead 2 - More Slots + +Left 4 Dead 2 server configuration for increasing the default player limits for the various modes (e.g. 8 player campaign, 8v8 versus). + +This also scales the difficulty instead of just allowing more to connect. + +Read the [ABM: A MultiSlots / SuperVersus Alternative plugin](https://forums.alliedmods.net/showthread.php?t=291562) page for more information. + +## Plugins + +Includes the following plugins: + +* [ABM: A MultiSlots / SuperVersus Alternative](https://forums.alliedmods.net/showthread.php?t=291562) +* [L4DToolZ Metamod plugin](https://forums.alliedmods.net/showthread.php?t=93600) +* [Force Mission Changer + Voting System](https://forums.alliedmods.net/showthread.php?p=2409561) + +## Environment variables + +* Same as the l4d2-metamod environment variables diff --git a/l4d2-moreslots/build.sh b/l4d2-moreslots/build.sh new file mode 100755 index 0000000..be3629e --- /dev/null +++ b/l4d2-moreslots/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. ../common.sh +docker_build l4d2-moreslots diff --git a/l4d2-abm/download.sh b/l4d2-moreslots/download.sh similarity index 92% rename from l4d2-abm/download.sh rename to l4d2-moreslots/download.sh index 2fde132..ecbe205 100755 --- a/l4d2-abm/download.sh +++ b/l4d2-moreslots/download.sh @@ -1,7 +1,7 @@ #!/bin/bash # ABM: A MultiSlots / SuperVersus Alternative -# https://forums.alliedmods.net/showthread.php?p=1984946#post1984946 +# https://forums.alliedmods.net/showthread.php?t=291562 curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/abm.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=168280&d=1517350697' curl -o /steam/l4d2/left4dead2/addons/sourcemod/gamedata/abm.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=168279&d=1517350697' diff --git a/l4d2-abm/start-l4d2.sh b/l4d2-moreslots/start-l4d2.sh similarity index 82% rename from l4d2-abm/start-l4d2.sh rename to l4d2-moreslots/start-l4d2.sh index 3263461..1911dfd 100755 --- a/l4d2-abm/start-l4d2.sh +++ b/l4d2-moreslots/start-l4d2.sh @@ -10,7 +10,7 @@ # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" [[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - ABM Mod" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - 8v8 Versus" [[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="8" # mp config @@ -26,11 +26,6 @@ sm_cvar sv_force_unreserved 1 sm_cvar fmc+vs_l4d(2)_enable 1 EOF -#sm_cvar l4d_maxplayers $MAXPLAYERS -#sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT -#sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT - - echo $FULL_ADMINS > left4dead2/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From ce409a03c2847a2ac1dbf906769a71ebe27da3da Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 15:56:11 +0100 Subject: [PATCH 12/55] Removed environment/config variables which did not work The ones specified required the left4downtown plugin --- l4d2-metamod/start-l4d2.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/l4d2-metamod/start-l4d2.sh b/l4d2-metamod/start-l4d2.sh index 7791871..68b5d79 100755 --- a/l4d2-metamod/start-l4d2.sh +++ b/l4d2-metamod/start-l4d2.sh @@ -4,14 +4,12 @@ [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" [[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" [[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" [[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" [[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - MetaMod" -[[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="4" # mp config @@ -20,12 +18,6 @@ cat </steam/l4d2/left4dead2/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD -l4d_maxplayers $MAXPLAYERS -sm_cvar l4d_maxplayers $MAXPLAYERS -l4d_survivor_limit $VERSUS_TEAM_LIMIT -sm_cvar l4d_survivor_limit $VERSUS_TEAM_LIMIT -l4d_infected_limit $VERSUS_TEAM_LIMIT -sm_cvar l4d_infected_limit $VERSUS_TEAM_LIMIT EOF echo '$FULL_ADMINS' > left4dead2/addons/sourcemod/configs/admins_simple.ini From 64a2052dc052789597486d8c9cd203f765642b39 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 16:15:53 +0100 Subject: [PATCH 13/55] Add TICKRATE and update readme with build notes --- insurgency/Dockerfile | 4 +-- insurgency/README.md | 31 +++++++++++++++----- insurgency/{start_insurgency.sh => start.sh} | 3 +- 3 files changed, 27 insertions(+), 11 deletions(-) rename insurgency/{start_insurgency.sh => start.sh} (92%) diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile index b580dcc..969a300 100644 --- a/insurgency/Dockerfile +++ b/insurgency/Dockerfile @@ -13,8 +13,8 @@ ARG CACHE_DATE # need to run docker build --build-arg CACHE_DATE="$(date)" RUN ./steamcmd.sh +login anonymous +force_install_dir ../insurgency2 +app_update 237410 +quit -ADD start_insurgency.sh /steam/insurgency2/ +ADD start.sh /steam/insurgency2/ WORKDIR /steam/insurgency2 -ENTRYPOINT ["./start_insurgency.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/insurgency/README.md b/insurgency/README.md index 6e79efd..bd2e6cd 100644 --- a/insurgency/README.md +++ b/insurgency/README.md @@ -1,5 +1,19 @@ # Insurgency +Insurgency server with some out-of-the-box configuration. + +## Build notes + +To catch updates since the original image was built, run: + +``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + Supports the following default configurations by setting environment variable `GAME_MODE`: * ambush @@ -18,11 +32,12 @@ Supports the following default configurations by setting environment variable `G Other configurable environment variables: -* SV_HOSTNAME -* SV_PASSWORD -* RCON_PASSWORD -* LAN (0 is not, 1 is LAN) -* MAXPLAYERS (humans + bots) -* MAPCYCLEFILE (look at your local steamapps\common\insurgency2\insurgency) -* SERVER_CFG (look at your local steamapps\common\insurgency2\insurgency\cfg) -* MAP (map gametype e.g. market skirmish) +* `SV_HOSTNAME` +* `SV_PASSWORD` +* `RCON_PASSWORD` +* `LAN` (0 is not, 1 is LAN) +* `MAXPLAYERS` (humans + bots) +* `MAPCYCLEFILE` (look at your local steamapps\common\insurgency2\insurgency) +* `SERVER_CFG` (look at your local steamapps\common\insurgency2\insurgency\cfg) +* `MAP` (map gametype e.g. market skirmish) +* `TICKRATE` diff --git a/insurgency/start_insurgency.sh b/insurgency/start.sh similarity index 92% rename from insurgency/start_insurgency.sh rename to insurgency/start.sh index 7084717..088cc90 100755 --- a/insurgency/start_insurgency.sh +++ b/insurgency/start.sh @@ -49,6 +49,7 @@ printf "Using mapcyclefile $MAPCYCLEFILE\n" printf "Using servercfg $SERVER_CFG\n" [[ -z $MAP ]] && MAP="$(head -1 /steam/insurgency2/insurgency/$MAPCYCLEFILE)" +[[ -z $TICKRATE ]] && TICKRATE=64 cat </steam/insurgency2/insurgency/cfg/server.cfg hostname $SV_HOSTNAME @@ -58,4 +59,4 @@ sv_password $SV_PASSWORD "mapcyclefile" "$MAPCYCLEFILE" EOF -exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 +exec $SERVER_CFG +exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 -tickrate $TICKRATE +exec $SERVER_CFG From f5d6c6742c848237334bd173811c8da53b53f726 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 16:40:54 +0100 Subject: [PATCH 14/55] Standardised the css directory contents --- css-gungame/Dockerfile | 4 ++-- css-gungame/README.md | 24 ++++++++++++++++++++++ css-gungame/download.sh | 2 ++ css-gungame/{start-css.sh => start.sh} | 3 +-- css-hideandseek/Dockerfile | 8 ++++---- css-hideandseek/README.md | 24 ++++++++++++++++++++++ css-hideandseek/download.sh | 2 ++ css-hideandseek/{start-css.sh => start.sh} | 3 +-- css-metamod/Dockerfile | 9 +++----- css-metamod/{start-css.sh => start.sh} | 0 css/Dockerfile | 9 ++++++-- css/README.md | 16 ++++++++++++++- css/{start-css.sh => start.sh} | 0 13 files changed, 85 insertions(+), 19 deletions(-) create mode 100644 css-gungame/README.md rename css-gungame/{start-css.sh => start.sh} (83%) create mode 100644 css-hideandseek/README.md rename css-hideandseek/{start-css.sh => start.sh} (83%) rename css-metamod/{start-css.sh => start.sh} (100%) rename css/{start-css.sh => start.sh} (100%) diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile index 09a69e8..c6c6e94 100644 --- a/css-gungame/Dockerfile +++ b/css-gungame/Dockerfile @@ -10,6 +10,6 @@ RUN ./download.sh && \ WORKDIR /steam/css -ADD start-css.sh . +ADD start.sh . -ENTRYPOINT [ "./start-css.sh" ] +ENTRYPOINT [ "./start.sh" ] diff --git a/css-gungame/README.md b/css-gungame/README.md new file mode 100644 index 0000000..4d62c3f --- /dev/null +++ b/css-gungame/README.md @@ -0,0 +1,24 @@ +# Counterstrike Source - Gun Game + +Counterstrike Source Gun Game server based on the css-metamod docker image. + +No bot support! + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build this one! + +## Plugins + +* [CS:S/CS:GO GunGame](https://forums.alliedmods.net/showthread.php?t=93977) + +## Environment variables + +* `RCON_PASSWORD` +* `SV_PASSWORD` +* `SV_HOSTNAME` +* `LAN` +* `MAP` +* `MAXPLAYERS` diff --git a/css-gungame/download.sh b/css-gungame/download.sh index 6a5e4bd..a60aab1 100755 --- a/css-gungame/download.sh +++ b/css-gungame/download.sh @@ -1,3 +1,5 @@ #! /bin/bash +# [CS:S/CS:GO] GunGame +# https://forums.alliedmods.net/showthread.php?t=93977 curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' diff --git a/css-gungame/start-css.sh b/css-gungame/start.sh similarity index 83% rename from css-gungame/start-css.sh rename to css-gungame/start.sh index 90efe74..1e45e07 100755 --- a/css-gungame/start-css.sh +++ b/css-gungame/start.sh @@ -4,7 +4,6 @@ [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" [[ -z "$MAP" ]] && MAP="de_dust2" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" @@ -18,6 +17,6 @@ rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD EOF -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini +echo "$FULL_ADMINS" > css/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css-hideandseek/Dockerfile b/css-hideandseek/Dockerfile index 5f650f6..cff8f0f 100644 --- a/css-hideandseek/Dockerfile +++ b/css-hideandseek/Dockerfile @@ -5,11 +5,11 @@ USER steam WORKDIR /steam/css/cstrike ADD download.sh . -RUN ./download.sh +RUN ./download.sh && \ + unzip sm_hideandseek.zip -RUN unzip sm_hideandseek.zip WORKDIR /steam/css -ADD start-css.sh . +ADD start.sh . -ENTRYPOINT [ "./start-css.sh" ] +ENTRYPOINT [ "./start.sh" ] diff --git a/css-hideandseek/README.md b/css-hideandseek/README.md new file mode 100644 index 0000000..2dc75b5 --- /dev/null +++ b/css-hideandseek/README.md @@ -0,0 +1,24 @@ +# Counterstrike Source - Hide and Seek (PropHunt) + +Counterstrike Source Hide and Seek server based on the css-metamod docker image. + +No bot support! + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build this one! + +## Plugins + +* [CS:S Hide and seek](https://forums.alliedmods.net/showthread.php?p=1158242) + +## Environment variables + +* `RCON_PASSWORD` +* `SV_PASSWORD` +* `SV_HOSTNAME` +* `LAN` +* `MAP` +* `MAXPLAYERS` diff --git a/css-hideandseek/download.sh b/css-hideandseek/download.sh index 79f274f..7b3f968 100755 --- a/css-hideandseek/download.sh +++ b/css-hideandseek/download.sh @@ -1,3 +1,5 @@ #! /bin/bash +# [CS:S] Hide and seek +# https://forums.alliedmods.net/showthread.php?p=1158242 curl -o sm_hideandseek.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=91862&d=1315059433' diff --git a/css-hideandseek/start-css.sh b/css-hideandseek/start.sh similarity index 83% rename from css-hideandseek/start-css.sh rename to css-hideandseek/start.sh index aa75387..2b37957 100755 --- a/css-hideandseek/start-css.sh +++ b/css-hideandseek/start.sh @@ -4,7 +4,6 @@ [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" [[ -z "$MAP" ]] && MAP="cs_office" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" @@ -18,6 +17,6 @@ rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD EOF -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini +echo "$FULL_ADMINS" > css/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css-metamod/Dockerfile b/css-metamod/Dockerfile index 2183b2d..5494a67 100644 --- a/css-metamod/Dockerfile +++ b/css-metamod/Dockerfile @@ -14,9 +14,6 @@ RUN tar -xf mm*.tar.gz -C cstrike/ && \ ADD metamod.vdf cstrike/ -ADD start-css.sh . -USER root -# I guess if you want to put config stuff in now is the time? -#ADD cfg csgo/cfg -RUN chown -R steam:steam cstrike/cfg/ -USER steam +ADD start.sh . + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-metamod/start-css.sh b/css-metamod/start.sh similarity index 100% rename from css-metamod/start-css.sh rename to css-metamod/start.sh diff --git a/css/Dockerfile b/css/Dockerfile index c0a9788..c4eb761 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -10,7 +10,12 @@ RUN mkdir -p /steam/css WORKDIR /steam/steamcmd_linux RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit +ARG CACHE_DATE +# do another update to catch updates since the original image was built +# need to run docker build --build-arg CACHE_DATE="$(date)" +RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit + WORKDIR /steam/css/ -ADD start*.sh . +ADD start.sh . -CMD ["./start-css.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/css/README.md b/css/README.md index 7baeb1b..2cf33e4 100644 --- a/css/README.md +++ b/css/README.md @@ -1,6 +1,19 @@ # Counterstrike Source -The following configuration is available via setting environment variables +Counterstrike Source server without plugins. + +## Build notes +To catch updates since the original image was built, run: + + ``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + +The following configuration is available via setting environment variables: ``` hostname $SV_HOSTNAME @@ -28,3 +41,4 @@ bot_allow_snipers $BOT_ALLOW_SNIPERS bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS ``` + diff --git a/css/start-css.sh b/css/start.sh similarity index 100% rename from css/start-css.sh rename to css/start.sh From b8fef322e439b48a7a05e16f29cea1616d562fd9 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 18:10:35 +0100 Subject: [PATCH 15/55] Renamed start scripts --- l4d2-metamod/Dockerfile | 4 ++-- l4d2-metamod/{start-l4d2.sh => start.sh} | 0 l4d2/Dockerfile | 4 ++-- l4d2/{start-l4d2.sh => start.sh} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename l4d2-metamod/{start-l4d2.sh => start.sh} (100%) rename l4d2/{start-l4d2.sh => start.sh} (100%) diff --git a/l4d2-metamod/Dockerfile b/l4d2-metamod/Dockerfile index 92ea2c4..e10d064 100644 --- a/l4d2-metamod/Dockerfile +++ b/l4d2-metamod/Dockerfile @@ -10,6 +10,6 @@ RUN tar -xf mm*.tar.gz -C left4dead2/ && \ ADD metamod.vdf left4dead2/ -ADD start-l4d2.sh . +ADD start.sh . -ENTRYPOINT ["./start-l4d2.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/l4d2-metamod/start-l4d2.sh b/l4d2-metamod/start.sh similarity index 100% rename from l4d2-metamod/start-l4d2.sh rename to l4d2-metamod/start.sh diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 251ec8e..377f097 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -16,6 +16,6 @@ ARG CACHE_DATE RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit WORKDIR /steam/l4d2/ -ADD start*.sh . +ADD start.sh . -ENTRYPOINT ["./start-l4d2.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/l4d2/start-l4d2.sh b/l4d2/start.sh similarity index 100% rename from l4d2/start-l4d2.sh rename to l4d2/start.sh From cd9be2fa87be6c559a6f1c9f81a846f1056d0df3 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 21 Aug 2018 22:34:28 +0100 Subject: [PATCH 16/55] Download Trackmania as part of Docker build --- trackmania-forever/Dockerfile | 21 +++++++++------------ trackmania-forever/start_server.sh | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/trackmania-forever/Dockerfile b/trackmania-forever/Dockerfile index 5e533d5..a213bf7 100644 --- a/trackmania-forever/Dockerfile +++ b/trackmania-forever/Dockerfile @@ -1,17 +1,14 @@ FROM base -## Put Trackmania Server zip file in this directory -## Download from http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip +RUN apt-get install -y unzip && \ + adduser tm -RUN apt-get install -y unzip -RUN adduser tm && mkdir /tm && chown tm:tm /tm -WORKDIR /tm -ADD *.zip /tm/ -RUN ls /tm/ -RUN unzip /tm/*.zip +WORKDIR /home/tm +RUN curl -o TrackmaniaServer_2011-02-21.zip http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip && \ + unzip *.zip -ADD tracklist*.cfg /tm/GameData/Tracks/ -ADD dedicated_cfg.txt /tm/GameData/Config/ -Add start_server.sh /tm/ +ADD tracklist*.cfg GameData/Tracks/ +ADD dedicated_cfg.txt GameData/Config/ +Add start_server.sh . -CMD ["/tm/start_server.sh"] \ No newline at end of file +ENTRYPOINT ["./start_server.sh"] diff --git a/trackmania-forever/start_server.sh b/trackmania-forever/start_server.sh index 45181d3..99ef954 100755 --- a/trackmania-forever/start_server.sh +++ b/trackmania-forever/start_server.sh @@ -1,6 +1,6 @@ #!/bin/bash -sed -i "s/%%SERVER_NAME%%/$SERVER_NAME/" /tm/GameData/Config/dedicated_cfg.txt +sed -i s/%%SERVER_NAME%%/$SERVER_NAME/ /home/tm/GameData/Config/dedicated_cfg.txt [[ -n $TRACKLIST ]] || TRACKLIST="tracklist-all.cfg" From eab7324a8385693a7ce7535306de3c07f3e9c590 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 27 Aug 2018 18:57:51 +0100 Subject: [PATCH 17/55] Added extra environment variables for configuration --- trackmania-forever/Dockerfile | 12 ++++++++---- trackmania-forever/README.md | 20 ++++++++++++++++++-- trackmania-forever/dedicated_cfg.txt | 18 +++++++++--------- trackmania-forever/start.sh | 28 ++++++++++++++++++++++++++++ trackmania-forever/start_server.sh | 8 -------- 5 files changed, 63 insertions(+), 23 deletions(-) create mode 100755 trackmania-forever/start.sh delete mode 100755 trackmania-forever/start_server.sh diff --git a/trackmania-forever/Dockerfile b/trackmania-forever/Dockerfile index a213bf7..63f49bf 100644 --- a/trackmania-forever/Dockerfile +++ b/trackmania-forever/Dockerfile @@ -1,14 +1,18 @@ FROM base RUN apt-get install -y unzip && \ - adduser tm + adduser tm && \ + mkdir /tm && \ + chown tm:tm /tm -WORKDIR /home/tm +USER tm +WORKDIR /tm RUN curl -o TrackmaniaServer_2011-02-21.zip http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip && \ unzip *.zip ADD tracklist*.cfg GameData/Tracks/ ADD dedicated_cfg.txt GameData/Config/ -Add start_server.sh . -ENTRYPOINT ["./start_server.sh"] +Add start.sh . + +ENTRYPOINT ["./start.sh"] diff --git a/trackmania-forever/README.md b/trackmania-forever/README.md index 246a235..f95558a 100644 --- a/trackmania-forever/README.md +++ b/trackmania-forever/README.md @@ -1,10 +1,26 @@ # Trackmania Nations Forever -### Useful links: +## Useful links: * [server admin GUI](http://cyrlaur.free.fr/ServerMania/download.php) -### Environment Variables +## Environment variables + +### Basic server settings * `SERVER_NAME` - Name server appears as in browser +* `SERVER_COMMENT` +* `SERVER_PASSWORD` +* `MAX_PLAYERS` * `TRACKLIST` - file name of the tracklist from this directory to use (eg, `-e "TRACKLIST=tracklist-red.cfg"`) + +### Super Admin and Admin passwords + +* `SUPER_ADMIN_PASSWORD` +* `ADMIN_PASSWORD` + +### Master server environment variables + +* `MASTER_SERVER_LOGIN` +* `MASTER_SERVER_PASSWORD` +* `MASTER_SERVER_KEY` diff --git a/trackmania-forever/dedicated_cfg.txt b/trackmania-forever/dedicated_cfg.txt index b2ec617..14f8d92 100644 --- a/trackmania-forever/dedicated_cfg.txt +++ b/trackmania-forever/dedicated_cfg.txt @@ -4,11 +4,11 @@ SuperAdmin - SuperAdmin + %%SUPER_ADMIN_PASSWORD%% Admin - Admin + %%ADMIN_PASSWORD%% User @@ -17,18 +17,18 @@ - - - + %%MASTER_SERVER_LOGIN%% + %%MASTER_SERVER_PASSWORD%% + %%MASTER_SERVER_KEY%% %%SERVER_NAME%% - + %%SERVER_COMMENT%% 0 - 1024 - + %%MAX_PLAYERS%% + %%SERVER_PASSWORD%% 1024 @@ -48,7 +48,7 @@ True - False + True False diff --git a/trackmania-forever/start.sh b/trackmania-forever/start.sh new file mode 100755 index 0000000..aab65a3 --- /dev/null +++ b/trackmania-forever/start.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +[[ -n $SERVER_NAME ]] || SERVER_NAME="Trackmania Forever Server" +[[ -n $SERVER_COMMENT ]] || SERVER_COMMENT="Powered by Docker" +[[ -n $MAX_PLAYERS ]] || MAX_PLAYERS=64 +[[ -n $TRACKLIST ]] || TRACKLIST="tracklist-all.cfg" + +[[ -n $SUPER_ADMIN_PASSWORD ]] || SUPER_ADMIN_PASSWORD=SuperAdmin +[[ -n $ADMIN_PASSWORD ]] || ADMIN_PASSWORD=AdminPassword +[[ -n $SERVER_PASSWORD ]] || SERVER_PASSWORD="" + +[[ -n $MASTER_SERVER_LOGIN ]] || MASTER_SERVER_LOGIN="" +[[ -n $MASTER_SERVER_PASSWORD ]] || MASTER_SERVER_PASSWORD="" +[[ -n $MASTER_SERVER_KEY ]] || MASTER_SERVER_KEY="" + +sed -i "s/%%SERVER_NAME%%/$SERVER_NAME/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%SERVER_COMMENT%%/$SERVER_COMMENT/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%SERVER_PASSWORD%%/$SERVER_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MAX_PLAYERS%%/$MAX_PLAYERS/" /tm/GameData/Config/dedicated_cfg.txt + +sed -i "s/%%SUPER_ADMIN_PASSWORD%%/$SUPER_ADMIN_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%ADMIN_PASSWORD%%/$ADMIN_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt + +sed -i "s/%%MASTER_SERVER_LOGIN%%/$MASTER_SERVER_LOGIN/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MASTER_SERVER_PASSWORD%%/$MASTER_SERVER_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MASTER_SERVER_KEY%%/$MASTER_SERVER_KEY/" /tm/GameData/Config/dedicated_cfg.txt + +exec ./TrackmaniaServer /lan /game_settings=$TRACKLIST /dedicated_cfg=dedicated_cfg.txt /nodaemon diff --git a/trackmania-forever/start_server.sh b/trackmania-forever/start_server.sh deleted file mode 100755 index 99ef954..0000000 --- a/trackmania-forever/start_server.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -sed -i s/%%SERVER_NAME%%/$SERVER_NAME/ /home/tm/GameData/Config/dedicated_cfg.txt - -[[ -n $TRACKLIST ]] || TRACKLIST="tracklist-all.cfg" - -exec ./TrackmaniaServer /lan /game_settings=$TRACKLIST /dedicated_cfg=dedicated_cfg.txt /nodaemon - From 4b49366150ffce0855c8b99dd54fe9bce1bdcb80 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 15 Apr 2019 21:43:01 +0100 Subject: [PATCH 18/55] use /openttd as path and set default passwords --- openttd/Dockerfile | 10 +++--- openttd/README.md | 44 ++++++++++++++++++++++++++ openttd/{start-openttd.sh => start.sh} | 19 +++++++---- 3 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 openttd/README.md rename openttd/{start-openttd.sh => start.sh} (79%) diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 6763e7d..63fb235 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -4,11 +4,11 @@ RUN apt-get update && \ apt-get install -y libsdl1.2debian \ libfontconfig1 && \ adduser openttd && \ - mkdir -p /home/openttd/extract && \ - chown -R openttd:openttd /home/openttd/extract + mkdir -p /openttd/extract && \ + chown -R openttd:openttd /openttd USER openttd -WORKDIR /home/openttd +WORKDIR /openttd ADD download.sh . @@ -26,6 +26,6 @@ RUN ./download.sh && \ unzip 'opensfx*.zip' -d extract/ && \ mv --no-clobber extract/opensfx-*/* baseset/opensfx/ -ADD start-openttd.sh /home/openttd/start-openttd.sh +ADD start.sh . -ENTRYPOINT ["./start-openttd.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/openttd/README.md b/openttd/README.md new file mode 100644 index 0000000..5e364c2 --- /dev/null +++ b/openttd/README.md @@ -0,0 +1,44 @@ +# OpenTTD Server + +## Environment variables + +For more information see https://wiki.openttd.org/Openttd.cfg + +### [network] +* `SERVER_NAME` +* `SERVER_PASSWORD` +* `RCON_PASSWORD` +* `ADMIN_PASSWORD` +* `MIN_ACTIVE_CLIENTS` + +### [vehicle] +* `MAX_TRAINS` +* `MAX_ROADVEH` +* `MAX_AIRCRAFT` +* `MAX_SHIPS` +* `ROAD_SIDE` +* `ROADVEH_ACCELERATION_MODEL` +* `TRAIN_ACCELERATION_MODEL` + +### [linkgraph] +* `DISTRIBUTION_PAX` +* `DISTRIBUTION_MAIL` +* `DISTRIBUTION_ARMOURED` +* `DISTRIBUTION_DEFAULT` + +### [locale] +* `CURRENCY` + +### [difficulty] +* `DISASTERS` +* `TERRAIN_TYPE` +* `MAX_NO_COMPETITORS` + +### [game_creation] +* `MAP_X` +* `MAP_Y` +* `STARTING_YEAR` +* `LANDSCAPE` + +### [gui] +* `AUTOSAVE` diff --git a/openttd/start-openttd.sh b/openttd/start.sh similarity index 79% rename from openttd/start-openttd.sh rename to openttd/start.sh index e3da9f5..4e8db7e 100755 --- a/openttd/start-openttd.sh +++ b/openttd/start.sh @@ -4,9 +4,9 @@ # [network] [[ -z $SERVER_NAME ]] && SERVER_NAME="OpenTTD Server" -[[ -n $SERVER_PASSWORD ]] && SERVER_PASSWORD="$SERVER_PASSWORD" -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $ADMIN_PASSWORD ]] && ADMIN_PASSWORD="$ADMIN_PASSWORD" +[[ -n $SERVER_PASSWORD ]] && SERVER_PASSWORD="" +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="changeme" +[[ -n $ADMIN_PASSWORD ]] && ADMIN_PASSWORD="changeme" [[ -z $MIN_ACTIVE_CLIENTS ]] && MIN_ACTIVE_CLIENTS=1 # [vehicle] @@ -29,20 +29,23 @@ # [difficulty] [[ -z $DISASTERS ]] && DISASTERS=false -[[ -z $TERRAIN_TYPE ]] && TERRAIN_TYPE=temperate +[[ -z $INDUSTRY_DENSITY ]] && INDUSTRY_DENSITY=5 +[[ -z $NUMBER_TOWNS ]] && NUMBER_TOWNS=5 +[[ -z $QUANTITY_SEA_LAKES ]] && QUANTITY_SEA_LAKES=0 +[[ -z $TERRAIN_TYPE ]] && TERRAIN_TYPE=2 [[ -z $MAX_NO_COMPETITORS ]] && MAX_NO_COMPETITORS=0 # [game_creation] [[ -z $MAP_X ]] && MAP_X=9 [[ -z $MAP_Y ]] && MAP_Y=9 [[ -z $STARTING_YEAR ]] && STARTING_YEAR=1970 -[[ -z $LANDSCAPE ]] && $LANDSCAPE=temperate +[[ -z $LANDSCAPE ]] && LANDSCAPE=temperate # [gui] [[ -z $AUTOSAVE ]] && AUTOSAVE=yearly -mkdir -p /home/openttd/.openttd/ -cat </home/openttd/.openttd/openttd.cfg +mkdir -p /openttd/.openttd/ +cat </openttd/.openttd/openttd.cfg [network] server_name = $SERVER_NAME server_password = $SERVER_PASSWORD @@ -71,6 +74,8 @@ currency = $CURRENCY [difficulty] disasters = $DISASTERS terrain_type = $TERRAIN_TYPE +number_towns = $NUMBER_TOWNS +quantity_sea_lakes = $QUANTITY_SEA_LAKES max_no_competitors = $MAX_NO_COMPETITORS [game_creation] From 38ba50f22d9875a3e3f36c55cbfef4179ca615fa Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 15 Apr 2019 22:29:30 +0100 Subject: [PATCH 19/55] remove utility files from CSGO --- csgo/Dockerfile | 11 ++++++----- csgo/build.sh | 3 --- csgo/startcontainer.sh | 4 ---- csgo/update.Dockerfile | 11 ----------- csgo/update.sh | 3 --- 5 files changed, 6 insertions(+), 26 deletions(-) delete mode 100755 csgo/build.sh delete mode 100755 csgo/startcontainer.sh delete mode 100644 csgo/update.Dockerfile delete mode 100755 csgo/update.sh diff --git a/csgo/Dockerfile b/csgo/Dockerfile index f25d8c9..7c0b027 100644 --- a/csgo/Dockerfile +++ b/csgo/Dockerfile @@ -1,16 +1,17 @@ FROM steamcmd -USER root - - USER steam WORKDIR /steam/steamcmd_linux RUN mkdir -p /steam/csgo + && ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit -RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit +ARG CACHE_DATE +# do another update to catch updates since the original image was built +# need to run docker build --build-arg CACHE_DATE="$(date)" +RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit ADD start.sh /steam/csgo/ WORKDIR /steam/csgo -CMD ["./start.sh"] \ No newline at end of file +CMD ["./start.sh"] diff --git a/csgo/build.sh b/csgo/build.sh deleted file mode 100755 index dcd0ff3..0000000 --- a/csgo/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo diff --git a/csgo/startcontainer.sh b/csgo/startcontainer.sh deleted file mode 100755 index a9f58db..0000000 --- a/csgo/startcontainer.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - - -docker run -it $2 -e "SERVER_NUM=$1" csgo diff --git a/csgo/update.Dockerfile b/csgo/update.Dockerfile deleted file mode 100644 index 53bf34d..0000000 --- a/csgo/update.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM csgo - - -USER steam -WORKDIR /steam/steamcmd_linux - -RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit - -WORKDIR /steam/csgo - -CMD ["./start.sh"] diff --git a/csgo/update.sh b/csgo/update.sh deleted file mode 100755 index d5cf822..0000000 --- a/csgo/update.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo update.Dockerfile From b4206a8d29fec7c0b25361ec3c1311edb17bd179 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 21:40:51 +0100 Subject: [PATCH 20/55] update openttd --- openttd/Dockerfile | 43 ++++++++++++++++++++++--------------------- openttd/README.md | 12 ++++++++++++ openttd/download.sh | 21 +++------------------ openttd/start.sh | 25 ++++++++++++++++++++----- 4 files changed, 57 insertions(+), 44 deletions(-) diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 63fb235..88b3a38 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -1,31 +1,32 @@ FROM base -RUN apt-get update && \ - apt-get install -y libsdl1.2debian \ - libfontconfig1 && \ - adduser openttd && \ - mkdir -p /openttd/extract && \ - chown -R openttd:openttd /openttd +RUN apt-get update \ + && apt-get install -y libsdl1.2debian libfontconfig1 liblzo2-2 \ + && adduser openttd \ + && mkdir -p /tmp \ + && chown -R openttd:openttd /tmp \ + && mkdir -p /home/openttd/.openttd/save \ + && chown -R openttd:openttd /home -USER openttd -WORKDIR /openttd +WORKDIR /tmp ADD download.sh . +RUN ./download.sh + +USER root +RUN dpkg -i *.deb \ + && mkdir -p /usr/share/games/openttd/baseset/opengfx/ \ + && unzip 'opengfx*.zip' \ + && ls -Chal \ + && tar -C /usr/share/games/openttd/baseset/opengfx/ -xf opengfx*.tar \ + && rm -fr *.zip *.tar *.deb -RUN ./download.sh && \ - mkdir -p baseset/opengfx/ && \ - mkdir -p baseset/openmsx/ && \ - mkdir -p baseset/opensfx/ && \ - tar -xf openttd-*-linux-generic-amd64.tar.gz -C extract/ && \ - mv --no-clobber extract/openttd-*-linux-generic-amd64/* . && \ - unzip 'opengfx*.zip' -d extract/ && \ - tar -xf extract/opengfx-*.tar -C extract/ && \ - mv --no-clobber extract/opengfx-*/* baseset/opengfx/ && \ - unzip 'openmsx*.zip' -d extract/ && \ - mv --no-clobber extract/openmsx-*/* baseset/openmsx/ && \ - unzip 'opensfx*.zip' -d extract/ && \ - mv --no-clobber extract/opensfx-*/* baseset/opensfx/ +USER openttd + +WORKDIR /usr/games ADD start.sh . +VOLUME [ "/home/openttd/.openttd/save" ] + ENTRYPOINT ["./start.sh"] diff --git a/openttd/README.md b/openttd/README.md index 5e364c2..de20da7 100644 --- a/openttd/README.md +++ b/openttd/README.md @@ -4,6 +4,8 @@ For more information see https://wiki.openttd.org/Openttd.cfg +Supported configuration variables: + ### [network] * `SERVER_NAME` * `SERVER_PASSWORD` @@ -20,6 +22,11 @@ For more information see https://wiki.openttd.org/Openttd.cfg * `ROADVEH_ACCELERATION_MODEL` * `TRAIN_ACCELERATION_MODEL` +### [economy] +* `FOUND_TOWN` +* `LARGER_TOWNS` +* `MULTIPLE_INDUSTRY_PER_TOWN` + ### [linkgraph] * `DISTRIBUTION_PAX` * `DISTRIBUTION_MAIL` @@ -32,6 +39,10 @@ For more information see https://wiki.openttd.org/Openttd.cfg ### [difficulty] * `DISASTERS` * `TERRAIN_TYPE` +* `INDUSTRY_DENSITY` +* `NUMBER_INDUSTRIES` +* `NUMBER_TOWNS` +* `QUANTITY_SEA_LAKES` * `MAX_NO_COMPETITORS` ### [game_creation] @@ -39,6 +50,7 @@ For more information see https://wiki.openttd.org/Openttd.cfg * `MAP_Y` * `STARTING_YEAR` * `LANDSCAPE` +* `TOWN_NAME` ### [gui] * `AUTOSAVE` diff --git a/openttd/download.sh b/openttd/download.sh index fb63058..d3c5cd0 100755 --- a/openttd/download.sh +++ b/openttd/download.sh @@ -1,7 +1,7 @@ #!/bin/bash -ls openttd*-linux-generic-amd64.tar.gz || ( - BINURL=$(curl https://www.openttd.org/en/download-stable | egrep -o "\/\/binaries.openttd.org/releases/.*/openttd-.*-linux-generic-amd64.tar.gz") +ls openttd*-linux-ubuntu-xenial-amd64.deb || ( + BINURL=$(curl https://www.openttd.org/downloads/openttd-releases/latest.html | egrep -o "\/\/proxy.binaries.openttd.org/openttd-releases/.*/openttd-.*-linux-ubuntu-xenial-amd64.deb") [[ -z "$BINURL" ]] && echo "failed to get binary URL" && exit 1 wget https:$BINURL @@ -9,23 +9,8 @@ ls openttd*-linux-generic-amd64.tar.gz || ( ls opengfx*-all.zip || ( - BINURL=$(curl https://www.openttd.org/en/download-opengfx | egrep -o "\/\/binaries.openttd.org/extra/opengfx/.*/opengfx-.*-all.zip") + BINURL=$(curl https://www.openttd.org/downloads/opengfx-releases/latest.html | egrep -o "\/\/binaries.openttd.org/extra/opengfx/.*/opengfx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get gfx URL" && exit 2 wget https:$BINURL ) - -ls opensfx*-all.zip || ( - BINURL=$(curl http://www.openttd.org/en/download-opensfx | egrep -o "\/\/binaries.openttd.org/extra/opensfx/.*/opensfx-.*-all.zip") - [[ -z "$BINURL" ]] && echo "failed to get sfx URL" && exit 3 - - wget https:$BINURL -) - - -ls openmsx*-all.zip || ( - BINURL=$(curl http://www.openttd.org/en/download-openmsx | egrep -o "\/\/binaries.openttd.org/extra/openmsx/.*/openmsx-.*-all.zip") - [[ -z "$BINURL" ]] && echo "failed to get msx URL" && exit 4 - - wget https:$BINURL -) diff --git a/openttd/start.sh b/openttd/start.sh index 4e8db7e..d75975c 100755 --- a/openttd/start.sh +++ b/openttd/start.sh @@ -18,6 +18,11 @@ [[ -z $ROADVEH_ACCELERATION_MODEL ]] && ROADVEH_ACCELERATION_MODEL=1 [[ -z $TRAIN_ACCELERATION_MODEL ]] && TRAIN_ACCELERATION_MODEL=1 +# [economy] +[[ -z $FOUND_TOWN ]] && FOUND_TOWN=1 +[[ -z $LARGER_TOWNS ]] && LARGER_TOWNS=1 +[[ -z $MULTIPLE_INDUSTRY_PER_TOWN ]] && MULTIPLE_INDUSTRY_PER_TOWN=true + # [linkgraph] [[ -z $DISTRIBUTION_PAX ]] && DISTRIBUTION_PAX=1 [[ -z $DISTRIBUTION_MAIL ]] && DISTRIBUTION_MAIL=1 @@ -29,9 +34,10 @@ # [difficulty] [[ -z $DISASTERS ]] && DISASTERS=false -[[ -z $INDUSTRY_DENSITY ]] && INDUSTRY_DENSITY=5 -[[ -z $NUMBER_TOWNS ]] && NUMBER_TOWNS=5 -[[ -z $QUANTITY_SEA_LAKES ]] && QUANTITY_SEA_LAKES=0 +[[ -z $INDUSTRY_DENSITY ]] && INDUSTRY_DENSITY=3 +[[ -z $NUMBER_INDUSTRIES ]] && NUMBER_INDUSTRIES=3 +[[ -z $NUMBER_TOWNS ]] && NUMBER_TOWNS=2 +[[ -z $QUANTITY_SEA_LAKES ]] && QUANTITY_SEA_LAKES=2 [[ -z $TERRAIN_TYPE ]] && TERRAIN_TYPE=2 [[ -z $MAX_NO_COMPETITORS ]] && MAX_NO_COMPETITORS=0 @@ -40,12 +46,13 @@ [[ -z $MAP_Y ]] && MAP_Y=9 [[ -z $STARTING_YEAR ]] && STARTING_YEAR=1970 [[ -z $LANDSCAPE ]] && LANDSCAPE=temperate +[[ -z $TOWN_NAME ]] && TOWN_NAME=german # [gui] [[ -z $AUTOSAVE ]] && AUTOSAVE=yearly -mkdir -p /openttd/.openttd/ -cat </openttd/.openttd/openttd.cfg +mkdir -p /home/openttd/.openttd/ +cat </home/openttd/.openttd/openttd.cfg [network] server_name = $SERVER_NAME server_password = $SERVER_PASSWORD @@ -62,6 +69,11 @@ road_side = $ROAD_SIDE roadveh_acceleration_model = $ROADVEH_ACCELERATION_MODEL train_acceleration_model = $TRAIN_ACCELERATION_MODEL +[economy] +found_town = $FOUND_TOWN +larger_towns = $LARGER_TOWNS +multiple_industry_per_town = $MULTIPLE_INDUSTRY_PER_TOWN + [linkgraph] distribution_pax = $DISTRIBUTION_PAX distribution_mail = $DISTRIBUTION_MAIL @@ -74,6 +86,8 @@ currency = $CURRENCY [difficulty] disasters = $DISASTERS terrain_type = $TERRAIN_TYPE +industry_density = $INDUSTRY_DENSITY +number_industries = $NUMBER_INDUSTRIES number_towns = $NUMBER_TOWNS quantity_sea_lakes = $QUANTITY_SEA_LAKES max_no_competitors = $MAX_NO_COMPETITORS @@ -83,6 +97,7 @@ landscape = $LANDSCAPE map_x = $MAP_X map_y = $MAP_Y starting_year = $STARTING_YEAR +town_name = $TOWN_NAME [gui] autosave = $AUTOSAVE From 7510983664c121497a905d44fb715da834d9ac48 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 21:41:59 +0100 Subject: [PATCH 21/55] remove common scripts --- build.sh | 7 ------- common.sh | 37 ------------------------------------- dstart.sh | 8 -------- settings.sh | 13 ------------- 4 files changed, 65 deletions(-) delete mode 100755 build.sh delete mode 100644 common.sh delete mode 100644 dstart.sh delete mode 100644 settings.sh diff --git a/build.sh b/build.sh deleted file mode 100755 index eac26ad..0000000 --- a/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -NAME=$1 -[[ -z $NAME ]] && echo "No image name given" && exit 1 - -[[ -f $NAME/build.sh ]] || (echo "Build file doesn't exist for $NAME/build.sh :( " && exit 1) -[[ -f $NAME/build.sh ]] && (cd $NAME && ./build.sh ) diff --git a/common.sh b/common.sh deleted file mode 100644 index e3d5a2c..0000000 --- a/common.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -gettimestamp() { - date +%Y%m%d-%H%M%S -} - -# Builds container with given name, and any dependencies -docker_build() { - local NAME=$1 - local DOCKERFILE=$2 - local OTHERARGS=$3 - local OVERRIDEDIR=$4 - local CACHE="" - - [[ -z $NAME ]] && echo "No name provided for docker build" && exit 1 - [[ -z $DOCKERFILE ]] && DOCKERFILE="-f Dockerfile" || DOCKERFILE="-f ${DOCKERFILE}" - [[ -z $OVERRIDEDIR ]] && DIR="." || DIR=$OVERRIDEDIR - - local PARENT="$(get_docker_parent $NAME)" - [[ -n $PARENT ]] && docker_build_if_needed $PARENT - [[ -n $NOCACHE ]] && CACHE="--no-cache" - (cd $BASE_DIR/$NAME && docker build $DOCKERFILE $CACHE $OTHERARGS -t $NAME -t $NAME:$(gettimestamp) $DIR ) -} - -# Builds a container if it doesn't already have a latest -docker_build_if_needed() { - local NAME=$1 - [[ "$(docker images --quiet $NAME:latest)" == "" ]] && docker_build $NAME -} - -get_docker_parent() { - local CHILD=$1 - [[ $CHILD == "base" ]] && exit 0 - grep -i "^FROM" $BASE_DIR/$CHILD/Dockerfile | head -n 1 | awk '{print $2}' | cut -d: -f1 -} diff --git a/dstart.sh b/dstart.sh deleted file mode 100644 index caafffc..0000000 --- a/dstart.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -NET="gameservers" -RESTART="unless-stopped" -DAEMON="-d" -[[ -n $NAME ]] && NAME="--name $NAME" || (echo "set NAME env var" && exit 1) - -docker run $DAEMON --net=$NET --restart=$RESTART $NAME $@ diff --git a/settings.sh b/settings.sh deleted file mode 100644 index 9cabf39..0000000 --- a/settings.sh +++ /dev/null @@ -1,13 +0,0 @@ - -# If you have set up a docker network for game servers to use (see advanced -# section of the README) then put its name here -[[ -z $NETWORK ]] && (docker network inspect gameservers 2>/dev/null >/dev/null ) && NETWORK="gameservers" -[[ -z $NETWORK ]] && NETWORK="host" - -# The docker container restart policy. Usually always, unless-stopped, or -# blank for never -[[ -z $RESTART ]] && RESTART="unless-stopped" - -[[ -z $OTHER_DOCKER_OPTS ]] && OTHER_DOCKER_OPTS="--detach" - - From c9ef5fd09c405c716250d2d9310997f1153353fa Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 21:42:54 +0100 Subject: [PATCH 22/55] remove build scripts --- base/build.sh | 5 ----- css/build.sh | 5 ----- l4d2-moreslots/build.sh | 3 --- l4d2/build.sh | 5 ----- steamcmd/build.sh | 5 ----- trackmania-forever/build.sh | 5 ----- 6 files changed, 28 deletions(-) delete mode 100755 base/build.sh delete mode 100755 css/build.sh delete mode 100755 l4d2-moreslots/build.sh delete mode 100755 l4d2/build.sh delete mode 100755 steamcmd/build.sh delete mode 100755 trackmania-forever/build.sh diff --git a/base/build.sh b/base/build.sh deleted file mode 100755 index 282f350..0000000 --- a/base/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -. ../common.sh - -[[ -z $TZ && -f /etc/timezone ]] && TZ=`cat /etc/timezone` -docker_build base Dockerfile "--build-arg TZ=$TZ" diff --git a/css/build.sh b/css/build.sh deleted file mode 100755 index f521d62..0000000 --- a/css/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build css diff --git a/l4d2-moreslots/build.sh b/l4d2-moreslots/build.sh deleted file mode 100755 index be3629e..0000000 --- a/l4d2-moreslots/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build l4d2-moreslots diff --git a/l4d2/build.sh b/l4d2/build.sh deleted file mode 100755 index 56c9a62..0000000 --- a/l4d2/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build l4d2 diff --git a/steamcmd/build.sh b/steamcmd/build.sh deleted file mode 100755 index 9b03654..0000000 --- a/steamcmd/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build steamcmd diff --git a/trackmania-forever/build.sh b/trackmania-forever/build.sh deleted file mode 100755 index 95156e2..0000000 --- a/trackmania-forever/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build trackmania-forever From af0a42c9b004a1ceff44af982a30ef81d6571531 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 22:39:31 +0100 Subject: [PATCH 23/55] update source readmes with LAN troubleshooting --- css/README.md | 3 +++ insurgency/README.md | 5 +++++ l4d2/README.md | 3 +++ tf2/README.md | 8 ++++++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/css/README.md b/css/README.md index 2cf33e4..70d112c 100644 --- a/css/README.md +++ b/css/README.md @@ -41,4 +41,7 @@ bot_allow_snipers $BOT_ALLOW_SNIPERS bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS ``` +## Troubleshooting +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/insurgency/README.md b/insurgency/README.md index bd2e6cd..b3f74eb 100644 --- a/insurgency/README.md +++ b/insurgency/README.md @@ -41,3 +41,8 @@ Other configurable environment variables: * `SERVER_CFG` (look at your local steamapps\common\insurgency2\insurgency\cfg) * `MAP` (map gametype e.g. market skirmish) * `TICKRATE` + +## Troubleshooting + +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/l4d2/README.md b/l4d2/README.md index 28e1ee3..9870748 100644 --- a/l4d2/README.md +++ b/l4d2/README.md @@ -4,3 +4,6 @@ * Sort of annoying * Default mode is versus * You must have enough people join the server or it boots everyone + +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/tf2/README.md b/tf2/README.md index 148dc7a..403ccb4 100644 --- a/tf2/README.md +++ b/tf2/README.md @@ -1,4 +1,8 @@ +# Team Fortress 2 -Useful links: - +## Useful links: * [tf2 wiki](https://wiki.teamfortress.com/wiki/Linux_dedicated_server) + +## Troubleshooting +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter From 85679a2e253334542be298f81295dd879255568a Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 22:42:14 +0100 Subject: [PATCH 24/55] update l4d2 and steamcmd --- {l4d2-moreslots => l4d2-abd}/Dockerfile | 4 ++-- {l4d2-moreslots => l4d2-abd}/README.md | 0 {l4d2-moreslots => l4d2-abd}/download.sh | 0 l4d2-moreslots/start-l4d2.sh => l4d2-abd/start.sh | 2 ++ l4d2-metamod/build.sh | 3 --- l4d2-metamod/start.sh | 2 ++ l4d2/start.sh | 2 ++ steamcmd/Dockerfile | 2 -- 8 files changed, 8 insertions(+), 7 deletions(-) rename {l4d2-moreslots => l4d2-abd}/Dockerfile (73%) rename {l4d2-moreslots => l4d2-abd}/README.md (100%) rename {l4d2-moreslots => l4d2-abd}/download.sh (100%) rename l4d2-moreslots/start-l4d2.sh => l4d2-abd/start.sh (91%) delete mode 100755 l4d2-metamod/build.sh diff --git a/l4d2-moreslots/Dockerfile b/l4d2-abd/Dockerfile similarity index 73% rename from l4d2-moreslots/Dockerfile rename to l4d2-abd/Dockerfile index 8c58ded..9a98131 100644 --- a/l4d2-moreslots/Dockerfile +++ b/l4d2-abd/Dockerfile @@ -7,5 +7,5 @@ ADD download.sh . RUN ./download.sh RUN unzip l4dtoolz.zip -d /steam/l4d2/left4dead2/addons -ADD start-l4d2.sh . -ENTRYPOINT ["./start-l4d2.sh"] +ADD start.sh . +ENTRYPOINT ["./start.sh"] diff --git a/l4d2-moreslots/README.md b/l4d2-abd/README.md similarity index 100% rename from l4d2-moreslots/README.md rename to l4d2-abd/README.md diff --git a/l4d2-moreslots/download.sh b/l4d2-abd/download.sh similarity index 100% rename from l4d2-moreslots/download.sh rename to l4d2-abd/download.sh diff --git a/l4d2-moreslots/start-l4d2.sh b/l4d2-abd/start.sh similarity index 91% rename from l4d2-moreslots/start-l4d2.sh rename to l4d2-abd/start.sh index 1911dfd..c27bde2 100755 --- a/l4d2-moreslots/start-l4d2.sh +++ b/l4d2-abd/start.sh @@ -2,6 +2,7 @@ # local vars [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" [[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="16" @@ -20,6 +21,7 @@ cat </steam/l4d2/left4dead2/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD +sv_allow_lobby_connect_only $ENABLE_LOBBY sm_cvar sv_maxplayers $MAX_PLAYERS sm_cvar sv_removehumanlimit 1 sm_cvar sv_force_unreserved 1 diff --git a/l4d2-metamod/build.sh b/l4d2-metamod/build.sh deleted file mode 100755 index 7cabd8e..0000000 --- a/l4d2-metamod/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build l4d2-metamod diff --git a/l4d2-metamod/start.sh b/l4d2-metamod/start.sh index 68b5d79..00f6606 100755 --- a/l4d2-metamod/start.sh +++ b/l4d2-metamod/start.sh @@ -2,6 +2,7 @@ # local vars [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" [[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" [[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" @@ -18,6 +19,7 @@ cat </steam/l4d2/left4dead2/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD +sv_allow_lobby_connect_only $ENABLE_LOBBY EOF echo '$FULL_ADMINS' > left4dead2/addons/sourcemod/configs/admins_simple.ini diff --git a/l4d2/start.sh b/l4d2/start.sh index 2c13778..e99365b 100755 --- a/l4d2/start.sh +++ b/l4d2/start.sh @@ -2,6 +2,7 @@ # local vars [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" [[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" @@ -18,6 +19,7 @@ cat </steam/l4d2/left4dead2/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD +sv_allow_lobby_connect_only $ENABLE_LOBBY EOF exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index bcf5301..4f10ca8 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -14,5 +14,3 @@ RUN tar -xf steamcmd_linux.tar.gz RUN ./steamcmd.sh +login anonymous +quit - - From ed7d166806e7ca4ddbe9ca2e34ee12da18c84e05 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Tue, 16 Apr 2019 22:43:19 +0100 Subject: [PATCH 25/55] update csgo --- csgo-gg/Dockerfile | 4 ++-- csgo-gg/build.sh | 3 --- csgo-gg/{start-gg.sh => start.sh} | 0 csgo/Dockerfile | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) delete mode 100755 csgo-gg/build.sh rename csgo-gg/{start-gg.sh => start.sh} (100%) diff --git a/csgo-gg/Dockerfile b/csgo-gg/Dockerfile index 87c4ba7..bae6781 100644 --- a/csgo-gg/Dockerfile +++ b/csgo-gg/Dockerfile @@ -1,6 +1,6 @@ FROM csgo:latest WORKDIR /steam/csgo -ADD start-gg.sh /steam/csgo/ +ADD start.sh /steam/csgo/ ADD gamemode_armsrace.cfg /steam/csgo/csgo/cfg/ -CMD ["./start-gg.sh"] \ No newline at end of file +CMD ["./start.sh"] diff --git a/csgo-gg/build.sh b/csgo-gg/build.sh deleted file mode 100755 index 5dfd206..0000000 --- a/csgo-gg/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo-gg diff --git a/csgo-gg/start-gg.sh b/csgo-gg/start.sh similarity index 100% rename from csgo-gg/start-gg.sh rename to csgo-gg/start.sh diff --git a/csgo/Dockerfile b/csgo/Dockerfile index 7c0b027..7063b78 100644 --- a/csgo/Dockerfile +++ b/csgo/Dockerfile @@ -2,7 +2,7 @@ FROM steamcmd USER steam WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/csgo +RUN mkdir -p /steam/csgo \ && ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit ARG CACHE_DATE From a775d6c62f284ee4494458fcd4a7523489816a59 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Sun, 22 Aug 2021 21:31:36 +0100 Subject: [PATCH 26/55] add SCPSL and new caching build script --- .gitignore | 3 +- base/Dockerfile | 7 +- csgo/.cache-info | 1 + csgo/.dockerignore | 7 + csgo/Dockerfile | 32 +- css/.cache-info | 1 + css/.dockerignore | 7 + css/Dockerfile | 24 +- docker_build.sh | 49 ++ hl2dm/.cache-info | 1 + hl2dm/.dockerignore | 7 + hl2dm/Dockerfile | 26 +- hl2dm/build.sh | 3 - insurgency/.cache-info | 1 + insurgency/.dockerignore | 7 + insurgency/Dockerfile | 25 +- insurgency/start.sh | 4 +- l4d2-abd/Dockerfile | 4 +- l4d2-abd/download.sh | 4 + l4d2-abd/start.sh | 14 + l4d2/.cache-info | 1 + l4d2/.dockerignore | 7 + l4d2/Dockerfile | 24 +- openttd/Dockerfile | 3 +- openttd/download.sh | 6 +- scpsl/.cache-info | 1 + scpsl/.dockerignore | 7 + scpsl/.env | 1 + scpsl/.gitignore | 2 + scpsl/Dockerfile | 28 ++ scpsl/README.md | 13 + .../config_gameplay.template.txt | 445 ++++++++++++++++++ .../config_remoteadmin.template.txt | 100 ++++ scpsl/start.sh | 10 + steamcmd/Dockerfile | 2 +- tf2/.cache-info | 1 + tf2/.dockerignore | 7 + tf2/Dockerfile | 22 +- tf2/build.sh | 5 - tf2/{start-tf2.sh => start.sh} | 0 ut2004/Dockerfile | 16 +- ut2004/build.sh | 9 - ut2004/download.sh | 3 + ut2004/{start-ut2004.sh => start.sh} | 0 44 files changed, 851 insertions(+), 89 deletions(-) create mode 100644 csgo/.cache-info create mode 100644 csgo/.dockerignore create mode 100644 css/.cache-info create mode 100644 css/.dockerignore create mode 100755 docker_build.sh create mode 100644 hl2dm/.cache-info create mode 100644 hl2dm/.dockerignore delete mode 100755 hl2dm/build.sh create mode 100644 insurgency/.cache-info create mode 100644 insurgency/.dockerignore create mode 100644 l4d2/.cache-info create mode 100644 l4d2/.dockerignore create mode 100644 scpsl/.cache-info create mode 100644 scpsl/.dockerignore create mode 100644 scpsl/.env create mode 100644 scpsl/.gitignore create mode 100644 scpsl/Dockerfile create mode 100644 scpsl/README.md create mode 100644 scpsl/config-templates/config_gameplay.template.txt create mode 100644 scpsl/config-templates/config_remoteadmin.template.txt create mode 100755 scpsl/start.sh create mode 100644 tf2/.cache-info create mode 100644 tf2/.dockerignore delete mode 100755 tf2/build.sh rename tf2/{start-tf2.sh => start.sh} (100%) delete mode 100755 ut2004/build.sh create mode 100755 ut2004/download.sh rename ut2004/{start-ut2004.sh => start.sh} (100%) diff --git a/.gitignore b/.gitignore index 402e8e4..6b225fc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ gamedata/ /data wads/ RemoteControlExamples/ - +.cache/ server_files/ +.cache diff --git a/base/Dockerfile b/base/Dockerfile index d50670d..aa1407a 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,4 +1,7 @@ -FROM ubuntu:16.04 +ARG DISTRO="focal" + +FROM ubuntu:${DISTRO} + ARG TZ="Etc/UTC" RUN sed -i 's/archive.ubuntu.com/au.archive.ubuntu.com/' /etc/apt/sources.list RUN apt-get update && apt-get dist-upgrade -y &&\ @@ -6,5 +9,3 @@ RUN apt-get update && apt-get dist-upgrade -y &&\ apt-get clean RUN echo "$TZ" > /etc/timezone RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime - -# add to base install: diff --git a/csgo/.cache-info b/csgo/.cache-info new file mode 100644 index 0000000..09a30e8 --- /dev/null +++ b/csgo/.cache-info @@ -0,0 +1 @@ +/steam/csgo \ No newline at end of file diff --git a/csgo/.dockerignore b/csgo/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/csgo/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/csgo/Dockerfile b/csgo/Dockerfile index 7063b78..d438bc0 100644 --- a/csgo/Dockerfile +++ b/csgo/Dockerfile @@ -1,17 +1,27 @@ FROM steamcmd -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/csgo \ - && ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit +# Dear srcds, plz don't crash. We have brought you these offerings. +USER root +RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 + +ENV GAME=csgo +ENV APP_ID=740 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . -ARG CACHE_DATE -# do another update to catch updates since the original image was built -# need to run docker build --build-arg CACHE_DATE="$(date)" -RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache -ADD start.sh /steam/csgo/ +COPY metamod.vdf,\ +start.sh\ + . + +USER steam -WORKDIR /steam/csgo +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit -CMD ["./start.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/css/.cache-info b/css/.cache-info new file mode 100644 index 0000000..d1667d5 --- /dev/null +++ b/css/.cache-info @@ -0,0 +1 @@ +/steam/css \ No newline at end of file diff --git a/css/.dockerignore b/css/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/css/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/css/Dockerfile b/css/Dockerfile index c4eb761..f44edcf 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -4,18 +4,22 @@ FROM steamcmd USER root RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 -USER steam -RUN mkdir -p /steam/css +ENV GAME=css +ENV APP_ID=232330 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . -WORKDIR /steam/steamcmd_linux -RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache -ARG CACHE_DATE -# do another update to catch updates since the original image was built -# need to run docker build --build-arg CACHE_DATE="$(date)" -RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit +COPY start.sh . + +USER steam -WORKDIR /steam/css/ -ADD start.sh . +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit ENTRYPOINT ["./start.sh"] diff --git a/docker_build.sh b/docker_build.sh new file mode 100755 index 0000000..1ca90ce --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +BASE_DIR=$(pwd) + +mkdir -p .cache + +if [[ -z $1 ]]; then + echo Specify containers to run 'docker build . -t ARG --build-arg CACHE_DATE=$(date)' against/ + echo e.g. 'docker_build.sh tf2,l4d2' + exit 1 +fi + +for i in $(echo $1 | sed "s/,/ /g") +do + echo "Building ${i}..." + cd ${i} + if [[ -f ".cache-info" ]]; then + echo "Found '.cache-info'!" + CACHE_DIR="${BASE_DIR}/.cache" + GAME_CACHE_DIR="${CACHE_DIR}/${i}" + if [[ -d "${GAME_CACHE_DIR}" ]]; then + echo "Copying existing master '.cache' for ${i}." + rm -fr .cache + cp -r "${GAME_CACHE_DIR}" .cache + else + echo "No existing master '.cache' for ${i} found." + fi + docker build . -t ${i} || exit 1 + SHORT_UUID=$(uuidgen) + SHORT_UUID=${SHORT_UUID%%-*} + BUILD_ID="$i-build-${SHORT_UUID}" + docker run -id --name "${BUILD_ID}" --entrypoint=/bin/bash $i \ + -c "read" || exit 1 + DIRECTORY_TO_CACHE=$(head -n 1 .cache-info) + echo "Caching contents of ${DIRECTORY_TO_CACHE}..." + docker cp "${BUILD_ID}":${DIRECTORY_TO_CACHE} "${CACHE_DIR}" || exit 1 + rm -fr .cache + echo "Killing build image..." + docker kill "${BUILD_ID}" || exit 1 + docker rm "${BUILD_ID}" || exit 1 + else + echo "No '.cache-info' found. Consider adding one to cache the contents of the image built to re-use later." + echo "Using CACHE_DATE in case new version needs created for the old way of trying to re-use existing images..." + docker build . --build-arg CACHE_DATE="$(date)" -t ${i} + fi + cd ${BASE_DIR} +done + +echo "Done! Bye for now!" diff --git a/hl2dm/.cache-info b/hl2dm/.cache-info new file mode 100644 index 0000000..2f02d71 --- /dev/null +++ b/hl2dm/.cache-info @@ -0,0 +1 @@ +/steam/hl2dm \ No newline at end of file diff --git a/hl2dm/.dockerignore b/hl2dm/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/hl2dm/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/hl2dm/Dockerfile b/hl2dm/Dockerfile index aa204b5..f48e3d1 100644 --- a/hl2dm/Dockerfile +++ b/hl2dm/Dockerfile @@ -1,13 +1,25 @@ FROM steamcmd -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/hl2dm +# Dear srcds, plz don't crash. We have brought you these offerings. +USER root +RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 + +ENV GAME=hl2dm +ENV APP_ID=232370 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . -RUN ./steamcmd.sh +login anonymous +force_install_dir ../hl2dm +app_update 232370 +quit +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache -WORKDIR /steam/hl2dm/ +COPY start.sh . + +USER steam -ADD start.sh /steam/hl2dm/ +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit -CMD ["./start.sh"] \ No newline at end of file +ENTRYPOINT ["./start.sh"] diff --git a/hl2dm/build.sh b/hl2dm/build.sh deleted file mode 100755 index 7fda5e9..0000000 --- a/hl2dm/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build hl2dm diff --git a/insurgency/.cache-info b/insurgency/.cache-info new file mode 100644 index 0000000..0ad29b2 --- /dev/null +++ b/insurgency/.cache-info @@ -0,0 +1 @@ +/steam/insurgency2 \ No newline at end of file diff --git a/insurgency/.dockerignore b/insurgency/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/insurgency/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile index 969a300..21d6aee 100644 --- a/insurgency/Dockerfile +++ b/insurgency/Dockerfile @@ -1,20 +1,25 @@ FROM steamcmd +# Dear srcds, plz don't crash. We have brought you these offerings. USER root +RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/insurgency2 +USER root -RUN ./steamcmd.sh +login anonymous +force_install_dir ../insurgency2 +app_update 237410 +quit +ENV GAME=insurgency2 +ENV APP_ID=237410 -ARG CACHE_DATE -# do another update to catch updates since the original image was built -# need to run docker build --build-arg CACHE_DATE="$(date)" -RUN ./steamcmd.sh +login anonymous +force_install_dir ../insurgency2 +app_update 237410 +quit +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY . . -ADD start.sh /steam/insurgency2/ +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache + +USER steam -WORKDIR /steam/insurgency2 +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit ENTRYPOINT ["./start.sh"] diff --git a/insurgency/start.sh b/insurgency/start.sh index 088cc90..1144f3b 100755 --- a/insurgency/start.sh +++ b/insurgency/start.sh @@ -2,6 +2,7 @@ [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" [[ -n $MAXPLAYERS ]] && MAXPLAYERS="$MAXPLAYERS" +[[ -n $MP_COOP_LOBBYSIZE ]] && MP_COOP_LOBBYSIZE="$MP_COOP_LOBBYSIZE" [[ -z $RCON_PASSWORD ]] && RCON_PASSWORD="changeme" [[ -n $SV_PASSWORD ]] && SV_PASSWORD=$SV_PASSWORD @@ -55,8 +56,9 @@ cat </steam/insurgency2/insurgency/cfg/server.cfg hostname $SV_HOSTNAME rcon_password $RCON_PASSWORD sv_password $SV_PASSWORD +mp_coop_lobbysize $MP_COOP_LOBBYSIZE "mapcyclefile" "$MAPCYCLEFILE" EOF -exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 -tickrate $TICKRATE +exec $SERVER_CFG +exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 -tickrate $TICKRATE -insecure +exec $SERVER_CFG diff --git a/l4d2-abd/Dockerfile b/l4d2-abd/Dockerfile index 9a98131..e4b77e4 100644 --- a/l4d2-abd/Dockerfile +++ b/l4d2-abd/Dockerfile @@ -5,7 +5,9 @@ USER steam ADD download.sh . RUN ./download.sh -RUN unzip l4dtoolz.zip -d /steam/l4d2/left4dead2/addons +RUN mkdir -p /steam/l4d2/left4dead2/addons/sourcemod/extensions/ +RUN unzip l4dtoolz.zip -d /steam/l4d2/left4dead2/addons \ + && unzip l4downtown.zip -d /steam/l4d2/left4dead2/addons/sourcemod/ ADD start.sh . ENTRYPOINT ["./start.sh"] diff --git a/l4d2-abd/download.sh b/l4d2-abd/download.sh index ecbe205..5308b5f 100755 --- a/l4d2-abd/download.sh +++ b/l4d2-abd/download.sh @@ -9,6 +9,10 @@ curl -o /steam/l4d2/left4dead2/addons/sourcemod/gamedata/abm.txt 'https://forums # https://forums.alliedmods.net/showthread.php?p=2409561 curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/fmc+vs-l4d2.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=165897&d=1507128318' +# Left4Downtown +# https://forums.alliedmods.net/showthread.php?t=91132 +curl -o l4downtown.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=144262&d=1429173388' + # L4DToolZ Metamod plugin (l4d1 & l4d2) # https://forums.alliedmods.net/showthread.php?t=93600 curl -o l4dtoolz.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=122230&d=1373147952' diff --git a/l4d2-abd/start.sh b/l4d2-abd/start.sh index c27bde2..63c2846 100755 --- a/l4d2-abd/start.sh +++ b/l4d2-abd/start.sh @@ -14,6 +14,11 @@ [[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - 8v8 Versus" [[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="8" +# abm config +[[ -z $ABM_EXTRAPLAYERS ]] && ABM_EXTRAPLAYERS="4" +[[ -z $ABM_MINPLAYERS ]] && ABM_MINPLAYERS="1" +[[ -z $ABM_OFFERTAKEOVER ]] && ABM_OFFERTAKEOVER="1" + # mp config # Create config file @@ -28,6 +33,15 @@ sm_cvar sv_force_unreserved 1 sm_cvar fmc+vs_l4d(2)_enable 1 EOF +#create abm config file +cat < /steam/l4d2/left4dead2/cfg/sourcemod/abm.cfg +abm_extraplayers = "$ABM_EXTRAPLAYERS" +abm_minplayers = "$ABM_MINPLAYERS" +abm_identityfix = "1" + +abm_offertakeover = "$ABM_OFFERTAKEOVER" +EOF + echo $FULL_ADMINS > left4dead2/addons/sourcemod/configs/admins_simple.ini exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2/.cache-info b/l4d2/.cache-info new file mode 100644 index 0000000..e5c0a12 --- /dev/null +++ b/l4d2/.cache-info @@ -0,0 +1 @@ +/steam/l4d2 \ No newline at end of file diff --git a/l4d2/.dockerignore b/l4d2/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/l4d2/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 377f097..7c35a20 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -4,18 +4,22 @@ FROM steamcmd USER root RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 -USER steam -RUN mkdir -p /steam/l4d2 +ENV GAME=l4d2 +ENV APP_ID=222860 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . -WORKDIR /steam/steamcmd_linux -RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache -ARG CACHE_DATE -# do another update to catch updates since the original image was built -# need to run docker build --build-arg CACHE_DATE="$(date)" -RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit +COPY start.sh . + +USER steam -WORKDIR /steam/l4d2/ -ADD start.sh . +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit ENTRYPOINT ["./start.sh"] diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 88b3a38..d943060 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -1,7 +1,7 @@ FROM base RUN apt-get update \ - && apt-get install -y libsdl1.2debian libfontconfig1 liblzo2-2 \ + && apt-get install -y libsdl1.2debian libfontconfig1 liblzo2-2 libfluidsynth2 libsdl2-2.0-0 \ && adduser openttd \ && mkdir -p /tmp \ && chown -R openttd:openttd /tmp \ @@ -10,6 +10,7 @@ RUN apt-get update \ WORKDIR /tmp +ARG DISTRO="focal" ADD download.sh . RUN ./download.sh diff --git a/openttd/download.sh b/openttd/download.sh index d3c5cd0..ddd3d71 100755 --- a/openttd/download.sh +++ b/openttd/download.sh @@ -1,7 +1,7 @@ #!/bin/bash -ls openttd*-linux-ubuntu-xenial-amd64.deb || ( - BINURL=$(curl https://www.openttd.org/downloads/openttd-releases/latest.html | egrep -o "\/\/proxy.binaries.openttd.org/openttd-releases/.*/openttd-.*-linux-ubuntu-xenial-amd64.deb") +ls "openttd*-linux-ubuntu-${DISTRO}-amd64.deb" || ( + BINURL=$(curl https://www.openttd.org/downloads/openttd-releases/latest.html | egrep -o "\/\/cdn.openttd.org/openttd-releases/.*/openttd-.*-linux-ubuntu-${DISTRO}-amd64.deb") [[ -z "$BINURL" ]] && echo "failed to get binary URL" && exit 1 wget https:$BINURL @@ -9,7 +9,7 @@ ls openttd*-linux-ubuntu-xenial-amd64.deb || ( ls opengfx*-all.zip || ( - BINURL=$(curl https://www.openttd.org/downloads/opengfx-releases/latest.html | egrep -o "\/\/binaries.openttd.org/extra/opengfx/.*/opengfx-.*-all.zip") + BINURL=$(curl https://www.openttd.org/downloads/opengfx-releases/latest.html | egrep -o "\/\/cdn.openttd.org/opengfx-releases/.*/opengfx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get gfx URL" && exit 2 wget https:$BINURL diff --git a/scpsl/.cache-info b/scpsl/.cache-info new file mode 100644 index 0000000..6124886 --- /dev/null +++ b/scpsl/.cache-info @@ -0,0 +1 @@ +/steam/scpsl \ No newline at end of file diff --git a/scpsl/.dockerignore b/scpsl/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/scpsl/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/scpsl/.env b/scpsl/.env new file mode 100644 index 0000000..d922a2d --- /dev/null +++ b/scpsl/.env @@ -0,0 +1 @@ +SERVER_PORT=7777 \ No newline at end of file diff --git a/scpsl/.gitignore b/scpsl/.gitignore new file mode 100644 index 0000000..98ab143 --- /dev/null +++ b/scpsl/.gitignore @@ -0,0 +1,2 @@ +config_gameplay.txt +config_remoteadmin.txt \ No newline at end of file diff --git a/scpsl/Dockerfile b/scpsl/Dockerfile new file mode 100644 index 0000000..27742e0 --- /dev/null +++ b/scpsl/Dockerfile @@ -0,0 +1,28 @@ +FROM steamcmd + +ENV GAME=scpsl +ENV APP_ID=996560 + +USER root +# ugly hack for HOME variable not being properly read in LocalAdmin +RUN mkdir "/SCP Secret Laboratory/" \ + && chmod a+rw "/SCP Secret Laboratory/" + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . + +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache + +COPY *.txt\ +start.sh\ + . + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit + +ENTRYPOINT ["./start.sh"] diff --git a/scpsl/README.md b/scpsl/README.md new file mode 100644 index 0000000..924eb42 --- /dev/null +++ b/scpsl/README.md @@ -0,0 +1,13 @@ +# SCP Secret Laboratory + +## Build notes +To catch updates since the original image was built, run: + + ``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + diff --git a/scpsl/config-templates/config_gameplay.template.txt b/scpsl/config-templates/config_gameplay.template.txt new file mode 100644 index 0000000..48d5507 --- /dev/null +++ b/scpsl/config-templates/config_gameplay.template.txt @@ -0,0 +1,445 @@ +#Server main settings +server_name: My Server Name +#default - uses server_name +player_list_title: default +player_list_title_rate: default +serverinfo_pastebin_id: 7wV681fT +server_ip: auto +max_players: 20 +server_tickrate: 60 +use_reserved_slots: true +lobby_waiting_time: default +ipv4_bind_ip: 0.0.0.0 +ipv6_bind_ip: :: +contact_email: default + +#Spawn settings +minimum_MTF_time_to_spawn: 280 +maximum_MTF_time_to_spawn: 350 +maximum_MTF_respawn_amount: 15 +maximum_CI_respawn_amount: 15 +priority_mtf_respawn: true +use_crypto_rng: false +team_respawn_queue: 40143140314414041340 +smart_class_picker: true + +## Player Info Range ## +# This controls the default range that the player information text appears on clients. +player_info_range: 10 # Default is 10. + +## Respawn ticket system settings ## + +# Enables the respawn tickets system. +# Each NTF or CI player spawned in consumes one ticket. +# We recommend keeping this on for game balance! +# +# Warning: Even if you disable the system, the tickets ratio for MTF/CI will still determine their spawn chance. +respawn_tickets_enable: true + +# Ticket counts (initial) +# The ratio of MTF-to-CI tickets directly determines which team has a higher chance of spawning. +# The initial settings (24:14) give around 36.8% chance for the CI to spawn instead of the MTF. +# The CI spawn chance can be calculated by this formula: CI_TICKETS / (MTF_TICKETS + CI_TICKETS) * 100% +respawn_tickets_mtf_initial_count: 24 +respawn_tickets_ci_initial_count: 14 + +# Ticket counts (events) +respawn_tickets_mtf_classd_cuffed_escape_count: 1 +respawn_tickets_mtf_scientist_escape_count: 1 +respawn_tickets_mtf_scp_hurt_escape_count: 1 +respawn_tickets_ci_classd_escape_count: 1 +respawn_tickets_ci_scientist_cuffed_escape_count: 2 +respawn_tickets_ci_scientist_died_count: 1 +respawn_tickets_ci_scp_item_count: 2 + +# Ticket misc settings +# The percentage of health an SCP must lose to trigger the 'scp_hurt' tickets. +respawn_tickets_mtf_scp_hurt_interval: 0.25 + + + +## Stamina system settings ## + +# The percentage of stamina used per second while sprinting. +# 0.05 = 5%, 0.33 = 33%, etc. +# NOTE: Stamina is currently only utilized on humans. +# 0 to disable, but this *will* cause weirdness with status effects +# and other mechanics, so we recommend keeping it on! +stamina_balance_use: 0.05 + +# The time (in seconds) that newly-spawned players can sprint +# without consuming stamina. Used to reduce visual artifacts. +# We recommend to put it at least 2 seconds +stamina_balance_immunity: 3 + +# The seconds that must pass before stamina starts regenerating after +the player stops sprinting. +# Lower values are more liekly to be exploited by players +# Higher higher can be annoying to players. +stamina_balance_regen_cd: 1 + +# How fast the stamina regenerates. +# This is a multiplier for the default setting, +# which is based on a curve - not a specific value. +stamina_balance_regen_speed: 1 + +# Multiplier for human walk speed. +# Default speed before multiplier is 4.5 m/s. +stamina_balance_walk_speed: 1.2 + +# Multiplier for human sprint speed. +# Default speed before multiplier is 7 m/s. +stamina_balance_sprint_speed: 1.05 + + + +#Random-stuff settings (-1: random) +server_forced_class: -1 +map_seed: -1 + +#Misc gameplay settings +intercom_cooldown: 120 +intercom_max_speech_time: 20 +auto_round_restart_time: 10 +friendly_fire: false +friendly_fire_multiplier: 1 +warhead_tminus_start_duration: 90 +human_grenade_multiplier: 0.7 +scp_grenade_multiplier: 1 +lock_gates_on_countdown: true +isolate_zones_on_countdown: false +open_doors_on_countdown: true +keep_items_after_escaping: true +allow_playing_as_tutorial: true +disable_decontamination: false +096_destroy_locked_doors: true +no_holidays: false +allow_disarmed_interaction: false +914_mode: default +sinkhole_slow_amount: 30 +sinkhole_spawn_chance: 0 +disconnect_drop: true +end_round_on_one_player: false + +# Time in seconds till ragdolls are removed. Set below 1 to disable. +ragdoll_cleanup_time: 0 + +#How many seconds someone is AFK sitting in their spawn location before they are kicked. Set to 0 or lower to disable. (Due to the 079 intro screen 079 has 13 extra seconds to be AFK.) +afk_time: 90 +constantly_check_afk: false + + +#Pocket Dimension settings +pd_exit_count: 2 +pd_random_exit_rids: +pd_random_exit_rids_after_decontamination: +pd_refresh_exit: false + +#Disarmer settings +mtf_can_cuff_researchers: true +ci_can_cuff_class_d: true +cuffed_escapee_change_team: true + +#Spawn Protect settings +spawn_protect_disable: true +spawn_protect_time: 30 +spawn_protect_team: [1, 2] +spawn_protect_allow_dmg: true + +#Auto Event Broadcast settings +auto_warhead_broadcast_enabled: false +auto_warhead_broadcast_message: The Alpha Warhead is being detonated +auto_warhead_broadcast_time: 10 +auto_warhead_detonate_broadcast: The Alpha Warhead has been detonated now +auto_warhead_detonate_broadcast_time: 10 +auto_decon_broadcast_enabled: false +auto_decon_broadcast_message: Light Containment Zone is now decontaminated +auto_decon_broadcast_time: 10 + +#Grenades chaining options +#-1 to unlimited, 0 to disable chain reaction + +#max amount of grenades that can be activated by a single grenade +grenade_chain_limit: 10 + +#limit of length of grenades chain +grenade_chain_length_limit: 4 + + + +#Security & Anticheat (default settings are good enough in most cases) +#Please type !private in your server console, if your server is verified, but you want to keep it hidden from the list. Type !public to make it public again. +online_mode: true +ip_banning: true +enable_whitelist: false +forward_ports: true +enable_query: false +query_port_shift: 0 +query_use_IPv6: true +administrator_query_password: none +connections_delay_time: 5 +enable_sync_command_binding: false +ratelimit_kick: true +same_account_joining: false +anticheat_console_output: false +enable_fast_round_restart: true +fast_round_restart_delay: 3.2 + +#Enables challenge during preauthentication +preauth_challenge: true + +#Reply - prevents from flooding server with preauth requests from spoofed IP addresses +#MD5 or SHA1 - prevents from flooding with preauth requests from legitimate IP addresses as well. Requires additional time to join the server. +preauth_challenge_mode: reply +preauth_challenge_base_length: 10 +preauth_challenge_time_window: 12 +preauth_challenge_clean_period: 4 + +#Only for MD5 and SHA1 challenges (higher value = longer time required to join the server) +preauth_challenge_secret_length: 2 + +#This enforces the player to be using same IP address to connect to the game and authenticate. +#Enabling this blocks proxies. Not enforced if player joined from IPv4 and authenticated from IPv6 or viceversa. +#Situations with combinating IPv4 and IPv6 addresses are being checked on central servers after authentication (only for servers on public list). +enforce_same_ip: true +no_enforcement_for_local_ip_addresses: true + +#This enforces that the IP address used to connect to the game and authenticate must be assigned to the same Internet Service Provider (ISP). +#Works only on servers on the public list. This is less restrictive that "enforce_same_ip" and blocks most of the proxies. +enforce_same_asn: true + +#Connections ratelimiting +#Ratelimit time windows define how often user with the same IP/UserID can initialize new connection (once per X seconds). +enable_ip_ratelimit: true +enable_userid_ratelimit: true +ip_ratelimit_window: 3 +userid_ratelimit_window: 5 + + + +## Item limits ## +# Ammo settings in this config are sorted as [X, Y, Z] +# X = 5.56mm (E-11-SR) +# Y = 7.62mm (Logicer, MP7) +# Z = 9mm (P90, COM-15) + +# Default ammo that each class gets on respawn +class_d_personnel_defaultammo: [0, 0, 0] +nine_tailed_fox_scientist_defaultammo: [120, 20, 20] +scientist_defaultammo: [0, 0, 0] +chaos_insurgency_defaultammo: [0, 100, 0] +nine_tailed_fox_lieutenant_defaultammo: [80, 0, 50] +nine_tailed_fox_commander_defaultammo: [120, 0, 100] +nine_tailed_fox_cadet_defaultammo: [40, 0, 100] +tutorial_defaultammo: [0, 0, 0] +facility_guard_defaultammo: [0, 35, 0] + +# Ammo limits, values from 0 to 65.5k, where 0 = unlimited. +class_d_personnel_ammolimit: [80, 70, 50] +nine_tailed_fox_scientist_ammolimit: [160, 100, 200] +scientist_ammolimit: [80, 70, 50] +chaos_insurgency_ammolimit: [80, 200, 100] +nine_tailed_fox_lieutenant_ammolimit: [160, 100, 200] +nine_tailed_fox_commander_ammolimit: [160, 100, 200] +nine_tailed_fox_cadet_ammolimit: [160, 100, 200] +tutorial_ammolimit: [160, 100, 200] +facility_guard_ammolimit: [160, 100, 200] + +# Item limits - values range from 0 to 8. +# Values of 0 are NOT unlimited and will prevent item pickups of that type entirely! +# The inventory can hold a max of 8 items, +# so a limit of 8 is effectively unlimited. +itemlimit_keycard: 3 +itemlimit_medical_item: 3 +itemlimit_weapon: 2 +itemlimit_grenade: 3 +itemlimit_scp_item: 3 + + + +#Friendly fire punishment +#Action is performed if someone either kills enough teammates OR deals enough damage to teammates. +#Set kills or damage to 0 to disable that threshold. +#Detectors priority: Respawn (kill), Window (kill), Life (kill), Round (kill), Respawn (damage), Window (damage), Life (damage), Round (damage) +#Actions: kill, kick, ban, noop (no operation - do nothing, eg. to enable logging) +#Damage dealt AFTER round end is ignored. + +ff_detector_global_broadcast_seconds: 5 +ff_detector_global_adminchat_seconds: 6 + +#If enabled Class D personnel can damage or kill other Class D personnel without being punished for it +ff_detector_classD_can_damage_classD: false + +#If set to "none" then the webhook for cheaters reporting will be used +ff_detector_webhook_url: none + + +#Per round +ff_detector_round_enabled: true +ff_detector_round_kills: 6 +ff_detector_round_damage: 500 + +ff_detector_round_action: ban +ff_detector_round_ban_time: 24h +ff_detector_round_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_round_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_round_adminchat_enable: false +ff_detector_round_adminchat_message: %nick has been banned for teamkilling (round detector). + +ff_detector_round_broadcast_enable: true +ff_detector_round_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_round_webhook_report: true + + +#Per life (resets on respawn) +ff_detector_life_enabled: true +ff_detector_life_kills: 4 +ff_detector_life_damage: 300 + +ff_detector_life_action: ban +ff_detector_life_ban_time: 24h +ff_detector_life_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_life_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_life_adminchat_enable: false +ff_detector_life_adminchat_message: %nick has been banned for teamkilling (life detector). + +ff_detector_life_broadcast_enable: true +ff_detector_life_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_life_webhook_report: true + + +#In a specified time window +ff_detector_window_enabled: true +ff_detector_window_seconds: 180 +ff_detector_window_kills: 3 +ff_detector_window_damage: 250 + +ff_detector_window_action: ban +ff_detector_window_ban_time: 16h +ff_detector_window_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_window_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_window_adminchat_enable: false +ff_detector_window_adminchat_message: %nick has been banned for teamkilling (window detector). + +ff_detector_window_broadcast_enable: true +ff_detector_window_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_window_webhook_report: true + + +#In a specified time window AFTER RESPAWN +ff_detector_spawn_enabled: true +ff_detector_spawn_window_seconds: 120 +ff_detector_spawn_kills: 2 +ff_detector_spawn_damage: 180 + +ff_detector_spawn_action: ban +ff_detector_spawn_ban_time: 48h +ff_detector_spawn_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_spawn_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_spawn_adminchat_enable: false +ff_detector_spawn_adminchat_message: %nick has been banned for teamkilling (spawn detector). + +ff_detector_spawn_broadcast_enable: true +ff_detector_spawn_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_spawn_webhook_report: true + + + +#Enable this if and ONLY if you use plugin or modification that provides custom whitelist. +#This is only to mark the server on the public list as using a whitelist. +#More information can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +custom_whitelist: false + +#Enable this if and ONLY if you use plugin or modification that restricts access to the server (other than whitelist, eg. password). +#This is only to mark the server on the public list as using access restriction. +#More information can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +server_access_restriction: false + +#Enable this if and ONLY if your server is a Custom Gamemode Server according to the definition that can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +custom_gamemode_server: false + +#port_queue is for NONDEDICATED SERVERS ONLY +port_queue: + - 7777 + - 7778 + - 7779 + - 7780 + - 7781 + - 7782 + - 7783 + - 7784 + +#Enabling this will automatically ban IP of players on the server that receives a Global Ban by a Global Moderator. (Defaults to false) +gban_ban_ip: default + +ban_nickname_maxlength: default +ban_nickname_trimunicode: default + +#Nickname filtering, using regex +nickname_filter: default +nickname_filter_replacement: default + +#Administrative actions broadcast options +broadcast_kicks: false +broadcast_kick_text: %nick% has been kicked from this server. +broadcast_kick_duration: 5 +broadcast_bans: true +broadcast_ban_text: %nick% has been banned from this server. +broadcast_ban_duration: 5 + +#Server idle mode +idle_mode_enabled: true +idle_mode_time: 5000 +idle_mode_preauth_time: 30000 +idle_mode_tickrate: 1 + +#Player report +report_send_using_discord_webhook: false +report_discord_webhook_url: PleaseSetWebhookUrlHere +report_username: Cheater Report +report_avatar_url: default +report_color: 14423100 +report_server_name: My SCP:SL Server +report_header: Player Report +report_content: Player has just been reported. + +#Restart options +#Requires LocalAdmin or a fully compatible tool. + +#You can set autorestart of the server after a specified amount of rounds (0 - disabled). +restart_after_rounds: 0 + +#Amount of time after client should rejoin after a full server restart. +#Adjust depending on your server restart time. +full_restart_rejoin_time: 25 + + +#Geoblocking +#If your server is on the public list, please refer to Verified Server Rules for more details. +#Modes: none, whitelist, blacklist +geoblocking_mode: none + +#If enabled, players on the whitelist are able to ignore geoblocking. +geoblocking_ignore_whitelisted: true + +#ISO country codes, eg. PL, US, DE +geoblocking_whitelist: + - AA + - AB + - AC + +geoblocking_blacklist: + - AA + - AB + - AC diff --git a/scpsl/config-templates/config_remoteadmin.template.txt b/scpsl/config-templates/config_remoteadmin.template.txt new file mode 100644 index 0000000..515db72 --- /dev/null +++ b/scpsl/config-templates/config_remoteadmin.template.txt @@ -0,0 +1,100 @@ +#Let's assign roles (you can modify them and create custom roles below) +#UserID format is SteamId64Here@steam, DiscordUserIDHere@discord, etc... +Members: + - SomeSteamId64@steam: owner + - SomeOtherSteamId64@steam: admin + - AnotherSteamId64@steam: admin + - SomeDiscordUserId@discord: moderator + +#Should Secret Lab development staff be able to use the Remote Admin? +enable_staff_access: false + +#Should Secret Lab CEO and managers be able to use Remote Admin? (We do not abuse our powers) +enable_manager_access: true + +#Allow remote admin access for the banning team, to allow them searching and fightung cheaters globally +enable_banteam_access: true + +#Enable reserved slots for the banning team (they are restricted by reserved slots limit set in the gameplay config) +enable_banteam_reserved_slots: true + +#Allow the banning team to bypass georestrictions on the server +enable_banteam_bypass_geoblocking: true + +#Let's define roles +#use color "none" to disable badge +#you can add own roles too +#cover means that this local badge is more important than a global badge and will cover it +#hidden means that this local badge is hiddeny by default (always you can use "hidetag" and "showtag" commands in game console or text-based remote admin) +#kick_power is the power for kicking and banning that the member of this group has (can be from 0 to 255) +#required_kick_power is the required kick power to kick or ban a member of this group (can be from 0 to 255) + +owner_badge: SERVER OWNER +owner_color: red +owner_cover: true +owner_hidden: false +owner_kick_power: 255 +owner_required_kick_power: 255 + +admin_badge: ADMIN +admin_color: red +admin_cover: true +admin_hidden: false +admin_kick_power: 1 +admin_required_kick_power: 2 + +moderator_badge: MODERATOR +moderator_color: silver +moderator_cover: true +moderator_hidden: false +moderator_kick_power: 0 +moderator_required_kick_power: 1 + +#And add them to the roles list +Roles: + - owner + - admin + - moderator + +#Let's setup permissions for roles +#More info can be found on our wiki: https://en.scpslgame.com/index.php/Docs:Permissions +Permissions: + - KickingAndShortTermBanning: [owner, admin, moderator] + - BanningUpToDay: [owner, admin, moderator] + - LongTermBanning: [owner, admin] + - ForceclassSelf: [owner, admin, moderator] + - ForceclassToSpectator: [owner, admin, moderator] + - ForceclassWithoutRestrictions: [owner, admin] + - GivingItems: [owner, admin] + - WarheadEvents: [owner, admin, moderator] + - RespawnEvents: [owner, admin] + - RoundEvents: [owner, admin, moderator] + - SetGroup: [owner] + - GameplayData: [owner, admin] + - Overwatch: [owner, admin, moderator] + - FacilityManagement: [owner, admin, moderator] + - PlayersManagement: [owner, admin] + - PermissionsManagement: [owner] + - ServerConsoleCommands: [] + - ViewHiddenBadges: [owner, admin, moderator] + - ServerConfigs: [owner] + - Broadcasting: [owner, admin, moderator] + - PlayerSensitiveDataAccess: [owner, admin, moderator] + - Noclip: [owner, admin] + - AFKImmunity: [owner, admin] + - AdminChat: [owner, admin, moderator] + - ViewHiddenGlobalBadges: [owner, admin, moderator] + - Announcer: [owner, admin] + - Effects: [owner, admin] + - FriendlyFireDetectorImmunity: [owner, admin, moderator] + - FriendlyFireDetectorTempDisable: [owner, admin] + +#Set to "none" in order to disable password. +#WE DON'T RECOMMEND USING PASSWORD!!! +#SETUP STEAMID AUTHENTICATION INSTEAD (of the top of this config file)! +override_password: none +override_password_role: owner + +#Allows running central server commands (they are prefixed with "!") using "sudo"/"cron" command in RA (requires ServerConsoleCommands permission). +#Don't turn on unless you fully trust all people with this permission, they needs to run that commands from RA and you know what are you doing +allow_central_server_commands_as_ServerConsoleCommands: false diff --git a/scpsl/start.sh b/scpsl/start.sh new file mode 100755 index 0000000..73a2030 --- /dev/null +++ b/scpsl/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +export CONFIG_DIR="/SCP Secret Laboratory/config/${SERVER_PORT}" + +mkdir -p "${CONFIG_DIR}" \ + && cp -r config_gameplay.txt "${CONFIG_DIR}/config_gameplay.txt" \ + && cp -r config_remoteadmin.txt "${CONFIG_DIR}/config_remoteadmin.txt" + +cd /steam/scpsl +./LocalAdmin ${SERVER_PORT} -d diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index 4f10ca8..6c39bcb 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -1,6 +1,6 @@ FROM base -RUN useradd -m steam +RUN useradd -m steam --create-home RUN mkdir -p /steam/steamcmd_linux diff --git a/tf2/.cache-info b/tf2/.cache-info new file mode 100644 index 0000000..c040dd0 --- /dev/null +++ b/tf2/.cache-info @@ -0,0 +1 @@ +/steam/tf2 \ No newline at end of file diff --git a/tf2/.dockerignore b/tf2/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2/Dockerfile b/tf2/Dockerfile index dd08e95..14d40be 100644 --- a/tf2/Dockerfile +++ b/tf2/Dockerfile @@ -4,14 +4,22 @@ FROM steamcmd USER root RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/tf2 +ENV GAME=tf2 +ENV APP_ID=232250 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . -RUN ./steamcmd.sh +login anonymous +force_install_dir ../tf2 +app_update 232250 +quit +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache -WORKDIR /steam/tf2/ +COPY start.sh . + +USER steam -ADD start*.sh . +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit -CMD ["./start-tf2.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/tf2/build.sh b/tf2/build.sh deleted file mode 100755 index 4f58207..0000000 --- a/tf2/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build tf2 diff --git a/tf2/start-tf2.sh b/tf2/start.sh similarity index 100% rename from tf2/start-tf2.sh rename to tf2/start.sh diff --git a/ut2004/Dockerfile b/ut2004/Dockerfile index f0c1c9d..5621b49 100644 --- a/ut2004/Dockerfile +++ b/ut2004/Dockerfile @@ -1,12 +1,16 @@ FROM base +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y libstdc++5:i386 \ + && apt-get clean \ + && mkdir ut2004 -RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y libstdc++5:i386 && apt-get clean +WORKDIR ut2004 +ADD download.sh . +RUN ./download.sh +ADD start.sh . -ADD server_files /ut2004 -ADD start-* /ut2004/ - -CMD ["/ut2004/start-ut2004.sh"] -# \ No newline at end of file +CMD ["./start.sh"] diff --git a/ut2004/build.sh b/ut2004/build.sh deleted file mode 100755 index 071c9ad..0000000 --- a/ut2004/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -. ../common.sh - -[[ -d server_files ]] || ( - echo "Download UT2004 server from http://www.fileplanet.com/146417/download/Unreal-Tournament-2004-Server-v3339-+-Bonus-Pack. Then unzip to server_files directory."; exit 1 - ) - -docker_build ut2004 diff --git a/ut2004/download.sh b/ut2004/download.sh new file mode 100755 index 0000000..6e19268 --- /dev/null +++ b/ut2004/download.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl -o https://www.utzone.de/forum/downloads.php?do=file&id=1196&act=down diff --git a/ut2004/start-ut2004.sh b/ut2004/start.sh similarity index 100% rename from ut2004/start-ut2004.sh rename to ut2004/start.sh From 7d98f4e0d7944d727ddcde7f2f80c59b5726717b Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 25 Aug 2021 23:24:38 +0100 Subject: [PATCH 27/55] update csgo and remove build.sh files --- README.md | 15 ++- csgo-metamod/Dockerfile | 19 ++++ csgo-metamod/README.md | 8 ++ csgo-metamod/download.sh | 17 +++ {csgo => csgo-metamod}/metamod.vdf | 0 csgo-metamod/start.sh | 6 ++ csgo/.gitignore | 1 + csgo/Dockerfile | 8 +- csgo/README.md | 8 +- csgo/config-templates/server.template.cfg | 126 ++++++++++++++++++++++ csgo/configure.sh | 28 +++++ csgo/launch.sh | 12 +++ csgo/start.sh | 52 +-------- css-gungame/build.sh | 3 - css-hideandseek/build.sh | 3 - css-metamod/build.sh | 3 - insurgency/build.sh | 3 - scpsl/Dockerfile | 6 +- tf2/start.sh | 8 -- 19 files changed, 243 insertions(+), 83 deletions(-) create mode 100644 csgo-metamod/Dockerfile create mode 100644 csgo-metamod/README.md create mode 100755 csgo-metamod/download.sh rename {csgo => csgo-metamod}/metamod.vdf (100%) create mode 100755 csgo-metamod/start.sh create mode 100644 csgo/.gitignore create mode 100644 csgo/config-templates/server.template.cfg create mode 100755 csgo/configure.sh create mode 100755 csgo/launch.sh delete mode 100755 css-gungame/build.sh delete mode 100755 css-hideandseek/build.sh delete mode 100755 css-metamod/build.sh delete mode 100755 insurgency/build.sh diff --git a/README.md b/README.md index 90d85d2..9106ab4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# gameservers-docker Putting game servers in Docker containers. Because it makes life easier. @@ -8,8 +9,10 @@ or sourcemod for srcds), making it almost one command to install a server. No binaries are stored in this repo, so make sure you have internet to download them with. -Includes a utility script `start_server.sh` which mounts save data to an -external volume and sorts out networking for you. +Includes utility scripts: + +- `start_server.sh` - mounts save data to an external volume and sorts out networking for you +- `docker_build.sh` - builds the specified list of containers. e.g. `docker_build.sh css,css-metamod,tf2` ## Quick start @@ -17,16 +20,18 @@ Assuming you are on a blank server with Git and docker installed: ``` git clone https://github.com/OpenSourceLAN/gameservers-docker.git . -./build.sh factorio +``` +Check the game directory for existing templates and make your configurations before building. +``` +./docker_build.sh factorio ./start_server.sh factorio # Or docker run -it --net=host -e "SERVER_NAME=Some really cool server"\ -v `pwd`/save:`cat factorio/mounts` --name factorio factorio - ``` -Most servers have environment variables that can be used to configure them. +Most servers have environment variables that can be used to configure them after building them. Read the README.md file in each directory to see what is available. ## Tutorial diff --git a/csgo-metamod/Dockerfile b/csgo-metamod/Dockerfile new file mode 100644 index 0000000..fffc8fb --- /dev/null +++ b/csgo-metamod/Dockerfile @@ -0,0 +1,19 @@ +FROM csgo + +WORKDIR /steam/csgo/ +USER steam +ADD download.sh . +RUN ./download.sh + +RUN tar -xf mm*.tar.gz -C csgo/ && \ + tar -xf sourcemod*.tar.gz -C csgo/ && \ + mv csgo/addons/sourcemod/plugins/disabled/mapchooser.smx csgo/addons/sourcemod/plugins/mapchooser.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/nominations.smx csgo/addons/sourcemod/plugins/nominations.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/randomcycle.smx csgo/addons/sourcemod/plugins/randomcycle.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/rockthevote.smx csgo/addons/sourcemod/plugins/rockthevote.smx + +ADD metamod.vdf csgo/ + +ADD start.sh . + +ENTRYPOINT [ "./start.sh" ] diff --git a/csgo-metamod/README.md b/csgo-metamod/README.md new file mode 100644 index 0000000..ec380d1 --- /dev/null +++ b/csgo-metamod/README.md @@ -0,0 +1,8 @@ +# CSGO (with MetaMod) + +This has sourcemod and metamod installed, with the following additional plugins enabled by default: + +* mapchooser +* nominations +* randomcycle +* rockthevote diff --git a/csgo-metamod/download.sh b/csgo-metamod/download.sh new file mode 100755 index 0000000..9a37bd3 --- /dev/null +++ b/csgo-metamod/download.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) + +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) + +curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) + +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") + +echo $SMVERSION +echo $SMMAJORVERSION + +SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +curl -o $SMVERSION $SMURL diff --git a/csgo/metamod.vdf b/csgo-metamod/metamod.vdf similarity index 100% rename from csgo/metamod.vdf rename to csgo-metamod/metamod.vdf diff --git a/csgo-metamod/start.sh b/csgo-metamod/start.sh new file mode 100755 index 0000000..433048c --- /dev/null +++ b/csgo-metamod/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "$FULL_ADMINS" "@Full Admins" > css/addons/sourcemod/configs/admins_simple.ini + +./configure.sh +./launch.sh diff --git a/csgo/.gitignore b/csgo/.gitignore new file mode 100644 index 0000000..d1edc99 --- /dev/null +++ b/csgo/.gitignore @@ -0,0 +1 @@ +server.cfg \ No newline at end of file diff --git a/csgo/Dockerfile b/csgo/Dockerfile index d438bc0..33f21a8 100644 --- a/csgo/Dockerfile +++ b/csgo/Dockerfile @@ -16,9 +16,11 @@ RUN chown -R steam /steam/${GAME}/ \ && mv .cache/* . \ && rm -fr .cache -COPY metamod.vdf,\ -start.sh\ - . +COPY server.cfg \ +configure.sh \ +launch.sh \ +start.sh \ +./ USER steam diff --git a/csgo/README.md b/csgo/README.md index d0d8d2e..aa44d59 100644 --- a/csgo/README.md +++ b/csgo/README.md @@ -1,5 +1,10 @@ +# CSGO -Base CSGO start script which supports these environmetn variables: +Copy and rename server.template.cfg into csgo to set additional config to build. + +# Environment variables + +The following configuration is available via setting environment variables * `SV_HOSTNAME` - sets the `hostname` of the server * `SERVER_TOKEN` - GSLT @@ -11,4 +16,3 @@ Base CSGO start script which supports these environmetn variables: * `RCON_PASSWORD` - rcon password * `OTHER_ARGS` - other arguments to pass to command line * `SOURCETV_ADDR` - make this server be a source TV relay and join the server specified - diff --git a/csgo/config-templates/server.template.cfg b/csgo/config-templates/server.template.cfg new file mode 100644 index 0000000..e684613 --- /dev/null +++ b/csgo/config-templates/server.template.cfg @@ -0,0 +1,126 @@ +log on //This is set to turn on logging! +sv_region "255" //The region of the world to report this server in. +sv_tags "" //Server tags. Used to provide extra information to clients when they're browsing for servers +// +// +// The Bot Convars +bot_difficulty 1 //Defines the skill of bots joining the game. Values are: 0=easy, 1=normal, 2=hard, 3=expert. +bot_chatter "off" //Control how bots talk. Allowed values: 'off', 'radio', 'minimal', or 'normal +bot_join_after_player 1 //If nonzero, bots wait until a player joins before entering the game. +bot_quota 10 //Determines the total number of bots in the game. +bot_quota_mode "fill" //Determines the type of quota. Allowed values: 'normal', 'fill', and 'match +// +// Server Convars +sv_pausable "0" //Is the server pausable. +sv_allow_lobby_connect_only "0" //If set, players may only join this server from matchmaking lobby, may not connect directly. +sv_allow_votes "1" //Allow voting? +sv_allow_wait_command "1" //Allow or disallow the wait command on clients connected to this server. +sv_alltalk "1" //Players can hear all other players' voice communication, no team restrictions +sv_alternateticks "0" //If set, server only simulates entities on even numbered ticks. +sv_cheats "0" //Allow cheats on server +sv_deadtalk "0" //Dead players can speak (voice, text) to the living +sv_downloadurl"0" //Location from which clients can download missing files +sv_forcepreload "0" //Force server side preloading +sv_friction "4" //World friction." +sv_full_alltalk "1" //Any player (including Spectator team) can speak to any other player +sv_infinite_ammo "0" //Player's active weapon will never run out of ammo +// +// Server Logging +sv_log_onefile "0" //Log server information to only one file. +sv_logbans "0" //Log server bans in the server logs. +sv_logecho "1" //Echo log information to the console. +sv_logfile "1" //Log server information in the log file. +sv_logflush "0" //Flush the log file to disk on each write (slow). +sv_logsdir "0" //Folder in the game directory where server logs will be stored. +// +// Server Downloads +//sv_downloadurl "0" //Location from which clients can download missing files +sv_allowdownload 1 +sv_allowupload 1 +net_maxfilesize 100 +// +// Pure Options +//sv_pure_kick_clients "1" //If set to 1, the server will kick clients with mismatching files. +//sv_pure_trace "0" //If set to 1, the server will print a message whenever a client is verifying a CRC for a file. +// +// Round Convars +mp_match_end_restart "0" //Restart the map at the end of round limit +mp_afterroundmoney "0" //Amount of money awarded to every player after each round +mp_playercashawards "1" //Players can earn money by performing in-game actions +mp_teamcashawards "1" //Teams can earn money by performing in-game actions +mp_maxrounds "30" //Maximum amount of rounds per map +mp_timelimit "0" //How many minutes for the whole map +mp_roundtime "2" //How many minutes each round takes. +mp_freezetime"5" //how many seconds to keep players frozen when the round starts +mp_buytime "45" //How many seconds after round start players can buy items for. +mp_forcecamera "1" //Set to 1 for team only spectating. +mp_defuser_allocation "2" //How to allocate defusers to CTs at start or round: 0=none, 1=random, 2=everyone +mp_death_drop_defuser "1" //Drop defuser on player death +mp_death_drop_grenade "2" //Which grenade to drop on player death: 0=none, 1=best, 2=current or best +mp_death_drop_gun "1" //Which gun to drop on player death: 0=none, 1=best, 2=current or best +// +// Friendly Fire +mp_friendlyfire "1" //Enable Friendly Fire 1 =Enable 0 =Disable +//ff_damage_reduction_grenade "0" //How much to reduce damage done to teammates by a thrown grenade. +//ff_damage_reduction_bullets "0" //How much to reduce damage done to teammates when shot. +//ff_damage_reduction_other "0" //How much to reduce damage done to teammates by things other than bullets and grenades. +// +// Game Convars +mp_autokick "1" //Kick idle/team-killing players +mp_autoteambalance "1" //Auto balances teams +mp_buytime "45" //How many seconds after round start players can buy items for. +mp_c4timer "45" //how long from when the C4 is armed until it blows +mp_do_warmup_period "1" //Whether or not to do a warmup period at the start of a match. +mp_force_pick_time "15" //The amount of time a player has on the team screen to make a selection before being auto-teamed +mp_halftime_duration "15" //Number of seconds that halftime lasts +mp_join_grace_time "15 //Number of seconds after round start to allow a player to join a game +mp_limitteams "2" //Max # of players 1 team can have over another (0 disables check) +mp_match_end_restart "1" //At the end of the match, perform a restart instead of loading a new map +mp_maxrounds "30" //Max amount of rounds per map +mp_playercashawards "1" //Players can earn money by performing in-game actions +mp_playerid "0" //Controls what information player see in the status bar: 0 all names; 1 team names; 2 no names +mp_playerid_delay "0" //Number of seconds to delay showing information in the status bar +mp_playerid_hold "0" //Number of seconds to keep showing old information in the status bar +mp_restartgame "0" //If non-zero, game will restart in the specified number of seconds +mp_round_restart_delay "7" //Number of seconds to delay before restarting a round after a win +mp_roundtime "3" //How many minutes each round takes. +mp_tkpunish "0" //Will a TK'er be punished in the next round? {0=no, 1=yes} +mp_warmuptime "25" //If true, there will be a warmup period/round at the start of each match to allow to connect. +mp_win_panel_display_time "5" //The amount of time to show the win panel between matches / halfs +// +// Cash Convars +mp_startmoney "400" //Amount of money each player gets when they reset. +mp_maxmoney "12000" //Maximum amount of money allowed in a player's account. +cash_team_terrorist_win_bomb "2200" //How much the team will win for the bomb. +cash_team_elimination_hostage_map "2200" //How much a player earns when they eliminate all hostages. +cash_team_elimination_bomb_map "2200" //How much the team will win when the bomb is eliminated. +cash_team_win_by_time_running_out "2200" //How much the team will win when the time runs out. +cash_team_win_by_defusing_bomb "2200" //How much the team will win when bomb has been defused. +cash_team_win_by_hostage_rescue "2200" //How much the team will win when all hostages have been rescued. +cash_team_loser_bonus "2000" //How much the team will win when when the team looses. +cash_team_loser_bonus_consecutive_rounds "500" //How much the team will win when the team looses consecutive rounds. +cash_team_rescued_hostage "100" //How much the team will win when team has recued a hostage. +cash_team_hostage_alive "0" //How much the team will win when a hostage is still alive +cash_team_planted_bomb_but_defused "200" //How much the team will win when when a team has planted a bomb and been defused +cash_team_hostage_interaction "50" //How much the team will win when hostages are saved +cash_player_killed_teammate "-3300" //How much the player will loose when a teammate has been team killed +cash_player_killed_enemy_default "200" //How much the player will win when killing an enemy +cash_player_killed_enemy_factor "0.5" //How much the player will win when killing an enemy +cash_player_bomb_planted "200" //How much the player will win when the bomb has been planted. +cash_player_bomb_defused "200" //How much the player will win when the bomb has been defused +cash_player_rescued_hostage "200" //How much the player will win when rescuing hostages +cash_player_interact_with_hostage "0" //How much the player will win when interacting with hostages +cash_player_damage_hostage "-30" //How much the player will loose when damaging a hostage +cash_player_killed_hostage "-1000" //How much the player will loose when a hostage has been killed +// +// Voting Options +sv_vote_allow_spectators "0" //Allow spectators to vote? +sv_vote_command_delay "2" //How long after a vote passes until the action happens +sv_vote_creation_time "120" //How often someone can individually call a vote. +sv_vote_failure_timer "300" //A vote that fails cannot be re-submitted for this long +sv_vote_quorum_ratio "0" //The minimum ratio of players needed to vote on an issue to resolve it. +sv_vote_timer_duration "15" //How long to allow voting on an issue +// +// TV Options +//tv_nochat "0" //Don't receive chat messages from other SourceTV spectators +//tv_port "check" //Host SourceTV port \ No newline at end of file diff --git a/csgo/configure.sh b/csgo/configure.sh new file mode 100755 index 0000000..a3805d2 --- /dev/null +++ b/csgo/configure.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ -z $SERVER_TOKEN ] +then + echo "Warning: No server token supplied" >&2 +fi + +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ $GAME_TYPE -ge 1 ]] && GAME_TYPE="1" || GAME_TYPE="0" +[[ $GAME_MODE -ge 1 ]] && GAME_MODE="1" || GAME_MODE="0" + +# Command line +[[ -n $GAME_TYPE ]] && GAME_TYPE="+game_type $GAME_TYPE" +[[ -n $GAME_MODE ]] && GAME_MODE="+game_mode $GAME_MODE" +[[ -n $MAP ]] && MAP="+map $MAP" +[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers_override $MAXPLAYERS" +[[ -n $SERVER_TOKEN ]] && SERVER_TOKEN="+sv_setsteamaccount $SERVER_TOKEN" +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="CS:GO Server" + +cat </steam/csgo/csgo/cfg/server.cfg + +hostname "$SV_HOSTNAME" +$RCON_PASSWORD +$SV_PASSWORD +EOF diff --git a/csgo/launch.sh b/csgo/launch.sh new file mode 100755 index 0000000..158bd03 --- /dev/null +++ b/csgo/launch.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +set -u + +if [[ -n $SOURCETV_ADDR ]] +then + echo "tv_title $HOSTNAME" > csgo/cfg/hostname.cfg + exec ./srcds_run -game csgo -console -tickrate 128 -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +else + exec ./srcds_run -game csgo +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE -tickrate 128 $MAXPLAYERS $SERVER_TOKEN $OTHER_ARGS $@ +fi diff --git a/csgo/start.sh b/csgo/start.sh index 598a631..30ebc68 100755 --- a/csgo/start.sh +++ b/csgo/start.sh @@ -1,52 +1,4 @@ #!/bin/bash -if [ -z $SERVER_TOKEN ] -then - echo "Warning: No server token supplied" >&2 -fi - -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ $GAME_TYPE -ge 1 ]] && GAME_TYPE="1" || GAME_TYPE="0" -[[ $GAME_MODE -ge 1 ]] && GAME_MODE="1" || GAME_MODE="0" - - -# Command line -[[ -n $GAME_TYPE ]] && GAME_TYPE="+game_type $GAME_TYPE" -[[ -n $GAME_MODE ]] && GAME_MODE="+game_mode $GAME_MODE" -[[ -n $MAP ]] && MAP="+map $MAP" -[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers_override $MAXPLAYERS" -[[ -n $SERVER_TOKEN ]] && SERVER_TOKEN="+sv_setsteamaccount $SERVER_TOKEN" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="CS:GO Server" - -cat </steam/csgo/csgo/cfg/server.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -EOF -cat </steam/csgo/csgo/cfg/server2.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -EOF - -if [[ -n $SOURCETV_ADDR ]] -then - echo "tv_title $HOSTNAME" > csgo/cfg/hostname.cfg - exec ./srcds_run -game csgo -console -tickrate 128 -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ - -else - - exec ./srcds_run -game csgo +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE -tickrate 128 $MAXPLAYERS $SERVER_TOKEN $OTHER_ARGS $@ - - -fi - - -#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini - - +./configure.sh +./launch.sh \ No newline at end of file diff --git a/css-gungame/build.sh b/css-gungame/build.sh deleted file mode 100755 index f64370d..0000000 --- a/css-gungame/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build css-gungame diff --git a/css-hideandseek/build.sh b/css-hideandseek/build.sh deleted file mode 100755 index 269b34a..0000000 --- a/css-hideandseek/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build css-hideandseek diff --git a/css-metamod/build.sh b/css-metamod/build.sh deleted file mode 100755 index 36ef64e..0000000 --- a/css-metamod/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build css-metamod diff --git a/insurgency/build.sh b/insurgency/build.sh deleted file mode 100755 index aaa95e8..0000000 --- a/insurgency/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build insurgency diff --git a/scpsl/Dockerfile b/scpsl/Dockerfile index 27742e0..6355848 100644 --- a/scpsl/Dockerfile +++ b/scpsl/Dockerfile @@ -17,9 +17,9 @@ RUN chown -R steam /steam/${GAME}/ \ && mv .cache/* . \ && rm -fr .cache -COPY *.txt\ -start.sh\ - . +COPY *.txt \ +start.sh \ +./ USER steam diff --git a/tf2/start.sh b/tf2/start.sh index 9539c71..aa94da9 100755 --- a/tf2/start.sh +++ b/tf2/start.sh @@ -39,15 +39,7 @@ if [[ -n $SOURCETV_ADDR ]] then echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg exec ./srcds_run -game tf -console -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ - else - exec ./srcds_run -game tf +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ - - fi - - #echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini - - From f8030306c4014c0d8ff916f6b35acb63b139374a Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 22 Aug 2022 16:58:27 +0100 Subject: [PATCH 28/55] SCP Secret Laboratory --- .gitignore | 2 +- base/Dockerfile | 21 +- docker_build.sh | 8 +- scpsl-exiled/.gitignore | 1 + scpsl-exiled/Dockerfile | 24 ++ scpsl-exiled/README.md | 17 + .../config-templates/config.template.yml | 334 ++++++++++++++++++ scpsl-exiled/download.sh | 19 + scpsl/.cache-info | 1 - scpsl/Dockerfile | 32 +- scpsl/start.sh | 4 +- 11 files changed, 438 insertions(+), 25 deletions(-) create mode 100644 scpsl-exiled/.gitignore create mode 100644 scpsl-exiled/Dockerfile create mode 100644 scpsl-exiled/README.md create mode 100644 scpsl-exiled/config-templates/config.template.yml create mode 100755 scpsl-exiled/download.sh delete mode 100644 scpsl/.cache-info diff --git a/.gitignore b/.gitignore index 6b225fc..f79d0c3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,6 @@ gamedata/ wads/ RemoteControlExamples/ .cache/ - +tmp/ server_files/ .cache diff --git a/base/Dockerfile b/base/Dockerfile index aa1407a..06f7a1c 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,11 +1,24 @@ -ARG DISTRO="focal" +ARG DISTRO="16.04" FROM ubuntu:${DISTRO} ARG TZ="Etc/UTC" RUN sed -i 's/archive.ubuntu.com/au.archive.ubuntu.com/' /etc/apt/sources.list -RUN apt-get update && apt-get dist-upgrade -y &&\ - apt-get install -y unzip p7zip-full curl wget lib32gcc1 iproute2 vim-tiny bzip2 jq software-properties-common apt-transport-https lib32stdc++6 && \ - apt-get clean +RUN apt-get update \ + && apt-get dist-upgrade -y \ + && apt-get install -y \ + unzip \ + p7zip-full\ + curl\ + wget\ + lib32gcc1\ + iproute2\ + vim-tiny\ + bzip2\ + jq\ + software-properties-common\ + apt-transport-https\ + lib32stdc++6\ + && apt-get clean RUN echo "$TZ" > /etc/timezone RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime diff --git a/docker_build.sh b/docker_build.sh index 1ca90ce..69d7692 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + BASE_DIR=$(pwd) mkdir -p .cache @@ -19,13 +21,13 @@ do CACHE_DIR="${BASE_DIR}/.cache" GAME_CACHE_DIR="${CACHE_DIR}/${i}" if [[ -d "${GAME_CACHE_DIR}" ]]; then - echo "Copying existing master '.cache' for ${i}." + echo "Moving existing master '.cache' for ${i}." rm -fr .cache - cp -r "${GAME_CACHE_DIR}" .cache + mv "${GAME_CACHE_DIR}" .cache else echo "No existing master '.cache' for ${i} found." fi - docker build . -t ${i} || exit 1 + docker build --progress=plain . -t ${i} || exit 1 SHORT_UUID=$(uuidgen) SHORT_UUID=${SHORT_UUID%%-*} BUILD_ID="$i-build-${SHORT_UUID}" diff --git a/scpsl-exiled/.gitignore b/scpsl-exiled/.gitignore new file mode 100644 index 0000000..e9abc7f --- /dev/null +++ b/scpsl-exiled/.gitignore @@ -0,0 +1 @@ +config.yml \ No newline at end of file diff --git a/scpsl-exiled/Dockerfile b/scpsl-exiled/Dockerfile new file mode 100644 index 0000000..e47811d --- /dev/null +++ b/scpsl-exiled/Dockerfile @@ -0,0 +1,24 @@ +FROM scpsl + +ADD download.sh . + +RUN ./download.sh + +USER root + +ENV CONFIG_DIR '/home/steam/.config/' + +RUN tar -xzvf Exiled.tar.gz \ + && mv Assembly-CSharp.dll SCPSL_Data/Managed/ \ + && mv EXILED "${CONFIG_DIR}" \ + && mv *.dll "${CONFIG_DIR}/EXILED/Plugins/" || exit 0 \ + && chown -R steam:steam "${CONFIG_DIR}" \ + && chmod u+rw "${CONFIG_DIR}" + +RUN rm -f *.tar.gz + +USER steam + +ADD config.yml "${CONFIG_DIR}/EXILED/Configs/${SERVER_PORT}-config.yml" + +ENTRYPOINT ["./start.sh"] diff --git a/scpsl-exiled/README.md b/scpsl-exiled/README.md new file mode 100644 index 0000000..44cf99d --- /dev/null +++ b/scpsl-exiled/README.md @@ -0,0 +1,17 @@ +# SCP Secret Labratory with EXILED mod + + + +## Plugins + +* EXILED +* Common-Utils +* Respawn Timer + +## Environment variables + +* + +## Useful IDs + +ChaosInsurgency ClassD FacilityGuard NtfCadet NtfCommander NtfLieutenant NtfScientist Scientist Scp049 Scp0492 Scp096 Scp106 Scp173 Tutorial Scp93953 Scp93989 \ No newline at end of file diff --git a/scpsl-exiled/config-templates/config.template.yml b/scpsl-exiled/config-templates/config.template.yml new file mode 100644 index 0000000..8e6dc4c --- /dev/null +++ b/scpsl-exiled/config-templates/config.template.yml @@ -0,0 +1,334 @@ +CommonUtilities: +# Whether or not debug messages should be shown. + debug: false + # The SCP Roles able to use V to talk to humans. + scp_speech: + - Scp049 + # Whether or not MTF/CI can 'escape' while disarmed to switch teams. + disarm_switch_teams: true + # Whether or not disarmed people will be prevented from interacting with doors/elevators. + restrictive_disarming: true + # The text displayed at the timed interval specified below. + timed_broadcast: This server is running EXILED Common-Utilities, enjoy your stay! + # The time each timed broadcast will be displayed. + timed_broadcast_duration: 5 + # The delay between each timed broadcast. To disable timed broadcasts, set this to 0 + timed_broadcast_delay: 300 + # The message displayed to the player when they first join the server. Setting this to empty will disable these broadcasts. + join_message: Welcome %player%! Please read our rules! + # The amount of time (in seconds) the join message is displayed. + join_message_duration: 5 + # The amount of time (in seconds) after the round starts, before the facilities auto-nuke will start. + autonuke_time: 1500 + # Wether or not the nuke should be unable to be disabled during the auto-nuke countdown. + autonuke_lock: true + # The message given to all players when the auto-nuke is triggered. A duration of 2 or more will be a text message on-screen. A duration of 1 makes it a cassie announcement. A duration of 0 disables it. + autonuke_broadcast: + # The broadcast content + content: The auto nuke has been activated. + # The broadcast duration + duration: 10 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # Whether or not to show player's health under their name when you look at them. + player_health_info: true + # Whether or not friendly fire should automatically turn on when a round ends (it will turn itself back off before the next round starts). + friendly_fire_on_round_end: false + # The multiplier applied to radio battery usage. Set to 0 to disable radio battery drain. + radio_battery_drain_multiplier: 1 + # The color to use for lights while the warhead is active. + warhead_color: + r: 1 + g: 0.2 + b: 0.2 + a: 1 + # The maximum time, in seconds, that a player can be AFK before being kicked. Set to -1 to disable AFK system. + afk_limit: 120 + # The list of starting items for roles. ItemName is the item to give them, and Chance is the percent chance of them spawning with it, and Group allows you to restrict the item to only players with certain RA groups (Leave this as 'none' to allow all players to get the item). You can specify the same item multiple times. + starting_inventories: + ClassD: + slot1: + - item_name: KeycardJanitor + chance: 10 + group: none + - item_name: Coin + chance: 100 + group: none + slot2: + - item_name: Flashlight + chance: 100 + group: none + slot3: [] + slot4: [] + slot5: [] + slot6: [] + slot7: [] + slot8: [] + ammo: + - type: Ammo556x45 + amount: 200 + group: none + # The list of custom 914 recipies. Original is the item being upgraded, New is the item to upgrade to, and Chance is the percent chance of the upgrade happening. You can specify multiple upgrade choices for the same item. + scp914_item_changes: + Rough: + - original: KeycardO5 + new: MicroHID + chance: 50 + # The list of custom 914 recipies for roles. Original is the role to be changed, New is the new role to assign, Chance is the % chance of the upgrade occuring. + scp914_class_changes: + Rough: + - original: ClassD + new: Spectator + chance: 100 + keep_inventory: true + # The list of 914 teleport settings. Note that if you set "zone" to anything other than Unspecified, it will always select a random room from that zone, instead of the room type defined. + scp914_teleport_chances: + Rough: + - zone: Unspecified + room: LczClassDSpawn + offset: + x: 0 + y: 0 + z: 0 + chance: 100 + damage: 0 + # A dictionary of random effects to apply to players when going through 914 on certain settings. + scp914_effect_chances: + Rough: + - effect: Amnesia + chance: 100 + duration: 0 + # Determines if 914 effects are exclusive, meaning only one can be applied each time a player is processed by 914. + scp914_effects_exclusivity: false + # Whether or not SCPs are immune to effects gained from 914. + scps_immune_to914_effects: false + # The frequency (in seconds) between ragdoll cleanups. Set to 0 to disable. + ragdoll_cleanup_delay: 0 + # If ragdoll cleanup should only happen in the Pocket Dimension or not. + ragdoll_cleanup_only_pocket: false + # The frequency (in seconds) between item cleanups. Set to 0 to disable. + item_cleanup_delay: 0 + # If item cleanup should only happen in the Pocket Dimension or not. + item_cleanup_only_pocket: false + # A list of all roles and their damage modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage. + role_damage_multipliers: + Scp173: 1 + # A list of all Weapons and their damage modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage. + damage_multipliers: + E11Sr: 1 + # A list of roles and how much health they should be given when they kill someone. + health_on_kill: + Scp173: 0 + Scp93953: 10 + Scp93989: 20 + # A list of roles and what their default starting health should be. + health_values: + Scp173: 3200 + NtfCaptain: 150 + # If the plugin is enabled or not. + is_enabled: true +RP Names: +# Is the plugin enabled? + is_enabled: true + # Should people lose nick when made into a tutorial? + tutorial_nick: true + # Should Class-D be D-#### (true) or should it follow the other names with Title + Name (false)? + dbois_setting: true + # Should SCPs have their SCP as a name (true) or should they be hidden as a D-Class (false)? + s_c_p_setting: true + # Should nicknames reset on death? + death_reset: false + # Should a player be told their nickname? + show_nick: true + # Should a player have there real name after their nickname? + show_real_name: false + # A dictionary with classes and their title + class_titles: + ClassD: D- + Scientist: Dr. + FacilityGuard: 'Security Officer ' + NtfCaptain: 'Commander ' + NtfPrivate: 'Cadet ' + NtfSergeant: 'Lieutenant ' + NtfSpecialist: 'Field Agent ' + ChaosConscript: 'Agent of Chaos ' + Scp049: 'SCP-049 ' + Scp0492: 'SCP-049-2 ' + Scp079: 'SCP-079 ' + Scp096: 'SCP-096 ' + Scp106: 'SCP-106 ' + Scp173: 'SCP-173 ' + Scp93953: 'SCP-939-53 ' + Scp93989: 'SCP-939-89 ' + # The list of names to be given. (Leave empty for default, if you want to make your own list, look at readme) + human_names: [] +class_broadcast_reborn: +# Is enabled? + is_enabled: true + # Broadcast, Hint or Window (if not the correct type, it will hint) + broadcast_type: Hint + # the time you want bc or hint to be + bc_time: 7 + # Set class bc text + class_bc: + ClassD: Dboiiiiii + Scp049: You are Doctor + Scp173: Haha matthew goes brrrr +exiled_credits: +# Is the plugin enabled? + is_enabled: true + # Info side - Badge, CustomPlayerInfo, FirstAvailable + mode: FirstAvailable + # Overrides badge if exists + badge_override: false + # Overrides Custom Player Info if exists + custom_player_info_override: false + # Whether or not the plugin should ignore a player's DNT flag. By default (false), players with DNT flag will not be checked for credit tags. + ignore_dnt_flag: false +exiled_custom_items: +# Indicates whether this plugin is enabled or not. + is_enabled: true + # The hint that is shown when someone pickups a custom item. + picked_up_hint: + # The broadcast content + content: >- + You have picked up a {0} + + {1} + # The broadcast duration + duration: 10 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # The hint that is shown when someone selects a custom item. + selected_hint: + # The broadcast content + content: >- + You have selected a {0} + + {1} + # The broadcast duration + duration: 5 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # Whether or not debug messages should be displayed in the server console. + debug: false +exiled_custom_roles: +# Whether or not the plugin is enabled. + is_enabled: true + # Whether or not debug messages should be shown. + debug: false + # The hint that is shown when someone gets a custom role. + got_role_hint: + # The broadcast content + content: >- + You have spawned as a {0} + + {1} + # The broadcast duration + duration: 6 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # The hint that is shown when someone used a custom ability. + used_ability_hint: + # The broadcast content + content: >- + Ability {0} has been activated. + + {1} + # The broadcast duration + duration: 5 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true +exiled_events: +# Indicates whether the plugin is enabled or not + is_enabled: true + # Indicates whether SCP-173 can be blocked or not by the tutorial + can_tutorial_block_scp173: true + # Indicates whether SCP-096 can be triggered or not by the tutorial + can_tutorial_trigger_scp096: true + # Indicates whether the name tracking is enabled or not + is_name_tracking_enabled: true + # Indicates whether the inventory should be dropped before being set as spectator, through commands or plugins + should_drop_inventory: true + # Indicates whether the blood can be spawned or not + can_spawn_blood: true + # Indicates whether configs have to be reloaded every round restart + should_reload_configs_at_round_restart: false + should_reload_translations_at_round_restart: false + # Indicates whether bans should be logged or not + should_log_bans: true + # Whether or not to log RA commands. + log_ra_commands: true +exiled_permissions: +# Indicates whether the debug should be shown or not + should_debug_be_shown: false + # The permissions folder path + folder: /home/steam/.config/EXILED/Configs + # The permissions full path + full_path: /home/steam/.config/EXILED/Configs/permissions.yml + # Indicates whether the plugin is enabled or not + is_enabled: true +exiled_updater: +# Indicates whether the plugin is enabled or not + is_enabled: true + # Indicates whether the debug should be shown or not + should_debug_be_shown: false + # Indicates whether testing releases have to be downloaded or not + should_download_testing_releases: false + # Indicates which assemblies should be excluded from the update + exclude_assemblies: [] +respawn_timer: +# Is the plugin enabled. + is_enabled: true + # Should debug messages be shown in a server console. + show_debug_messages: false + # Should a timer be lower or higher on the screen. (values from 0 to 14, 0 - very high, 14 - very low) + text_lowering: 8 + # Should a timer show an exact number of minutes? + show_minutes: true + # Should a timer show an exact number of seconds? + show_seconds: true + # Should a timer be only shown, when a spawnning sequence has begun? (NTF Helicopter / Chaos Car arrives) + show_timer_only_on_spawn: false + # Should number of spectators be shown? + show_number_of_spectators: true + # Should the NTF and CI respawn tickets be shown? + show_tickets: true +scp008_x: + is_enabled: true + # Only enable this if you're looking for bug sources! + debug_mode: false + # Percent chance to create infection. + infection_chance: 100 + # Percent chance to successfully cure. + cure_chance: 50 + # Allow SCP-049 to instantly revive targets? + buff_doctor: false + # Base zombie health. + zombie_health: 500 + # Max zombie health. + max_zombie_health: 700 + # How much AHP should be given to Zombies? + scp008_buff: 10 + # 008x zombie starting Ahp (Shield). + starting_ahp: 100 + # How much AHP should zombies stop earning at? + max_ahp: 100 + # Whether to have a public cassie announcement. + cassie_announce: true + # Announcement for server. + announcement: SCP 0 0 8 containment breach detected . Allremaining + # How much damage 008 zombie does per hit. + zombie_damage: 24 + # Text displayed to players after they've been infected + infection_alert: You've been infected! Use SCP-500 or a medkit to be cured! diff --git a/scpsl-exiled/download.sh b/scpsl-exiled/download.sh new file mode 100755 index 0000000..2cf54fe --- /dev/null +++ b/scpsl-exiled/download.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# https://github.com/Exiled-Team/EXILED/releases +curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/5.2.2/Exiled.tar.gz' + +# https://github.com/Exiled-Team/Common-Utils + curl -LO 'https://github.com/Exiled-Team/Common-Utils/releases/download/6.2.0/Common_Utilities.dll' + +# https://github.com/Michal78900/RespawnTimer + curl -LO 'https://github.com/Michal78900/RespawnTimer/releases/download/v3.1.0/RespawnTimer.dll' + +# https://github.com/VersLugia/ClassBroadcastReborn + curl -LO 'https://github.com/VersLugia/ClassBroadcastReborn/releases/download/1.1/ClassBroadcastReborn.dll' + +# https://github.com/babyboucher/RPNames + curl -LO 'https://github.com/babyboucher/RPNames/releases/download/v1.8.0/RPNames.dll' + +# https://github.com/DGvagabond/SCP-008-X + curl -LO 'https://github.com/DGvagabond/SCP-008-X/releases/download/3.1.2/SCP008X.dll' diff --git a/scpsl/.cache-info b/scpsl/.cache-info deleted file mode 100644 index 6124886..0000000 --- a/scpsl/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/scpsl \ No newline at end of file diff --git a/scpsl/Dockerfile b/scpsl/Dockerfile index 6355848..576ffeb 100644 --- a/scpsl/Dockerfile +++ b/scpsl/Dockerfile @@ -3,26 +3,28 @@ FROM steamcmd ENV GAME=scpsl ENV APP_ID=996560 -USER root -# ugly hack for HOME variable not being properly read in LocalAdmin -RUN mkdir "/SCP Secret Laboratory/" \ - && chmod a+rw "/SCP Secret Laboratory/" +RUN mkdir -p /steam/${GAME}/ \ + && chown steam /steam/${GAME}/ + +USER steam -RUN mkdir -p /steam/${GAME}/.cache/ \ - && touch /steam/${GAME}/.cache/empty WORKDIR /steam/${GAME}/ -COPY .cache . -RUN chown -R steam /steam/${GAME}/ \ - && mv .cache/* . \ - && rm -fr .cache +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -COPY *.txt \ -start.sh \ -./ +ENV SERVER_PORT=7777 +ENV GAME_DIR=/home/steam/.config/SCP\ Secret\ Laboratory +ENV INSTANCE_DIR=${GAME_DIR}/config/${SERVER_PORT}/ +COPY *.txt "${INSTANCE_DIR}" -USER steam +USER root + +RUN chown -R steam:steam "${GAME_DIR}" \ + && chmod u+rw "${GAME_DIR}" -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit +USER steam +COPY start.sh . ENTRYPOINT ["./start.sh"] diff --git a/scpsl/start.sh b/scpsl/start.sh index 73a2030..67f7400 100755 --- a/scpsl/start.sh +++ b/scpsl/start.sh @@ -1,10 +1,12 @@ #!/bin/bash +set -e +set -u + export CONFIG_DIR="/SCP Secret Laboratory/config/${SERVER_PORT}" mkdir -p "${CONFIG_DIR}" \ && cp -r config_gameplay.txt "${CONFIG_DIR}/config_gameplay.txt" \ && cp -r config_remoteadmin.txt "${CONFIG_DIR}/config_remoteadmin.txt" -cd /steam/scpsl ./LocalAdmin ${SERVER_PORT} -d From 9bc39193bc1eca3ac7e6b232d4628dba66465e66 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 26 Aug 2022 02:22:59 +0100 Subject: [PATCH 29/55] l4d2 multislot --- base/Dockerfile | 4 +- docker_build.sh | 33 +-- l4d2-abd/Dockerfile | 13 -- l4d2-abd/README.md | 19 -- l4d2-abd/download.sh | 18 -- l4d2-abd/start.sh | 47 ----- l4d2-metamod/.gitignore | 1 + l4d2-metamod/Dockerfile | 23 +- .../admins_simple.template.ini | 45 ++++ l4d2-metamod/download.sh | 33 ++- l4d2-metamod/start.sh | 27 --- l4d2-multislot/.gitignore | 3 + l4d2-multislot/Dockerfile | 17 ++ l4d2-multislot/README.md | 7 + .../l4d_hp_laser.template.cfg | 199 ++++++++++++++++++ .../l4dinfectedbots.template.cfg | 164 +++++++++++++++ .../l4dmultislots.template.cfg | 31 +++ l4d2-multislot/download.sh | 130 ++++++++++++ l4d2-multislot/update_config.sh | 46 ++++ l4d2/.cache-info | 1 - l4d2/.gitignore | 1 + l4d2/Dockerfile | 22 +- l4d2/config-templates/server.template.cfg | 83 ++++++++ l4d2/start.sh | 21 +- l4d2/update_server_details.sh | 23 ++ l4d2/zip-utils.sh | 67 ++++++ steamcmd/Dockerfile | 1 - 27 files changed, 882 insertions(+), 197 deletions(-) delete mode 100644 l4d2-abd/Dockerfile delete mode 100644 l4d2-abd/README.md delete mode 100755 l4d2-abd/download.sh delete mode 100755 l4d2-abd/start.sh create mode 100644 l4d2-metamod/.gitignore create mode 100644 l4d2-metamod/config-templates/admins_simple.template.ini delete mode 100755 l4d2-metamod/start.sh create mode 100644 l4d2-multislot/.gitignore create mode 100644 l4d2-multislot/Dockerfile create mode 100644 l4d2-multislot/README.md create mode 100644 l4d2-multislot/config-templates/l4d_hp_laser.template.cfg create mode 100644 l4d2-multislot/config-templates/l4dinfectedbots.template.cfg create mode 100644 l4d2-multislot/config-templates/l4dmultislots.template.cfg create mode 100755 l4d2-multislot/download.sh create mode 100755 l4d2-multislot/update_config.sh delete mode 100644 l4d2/.cache-info create mode 100644 l4d2/.gitignore create mode 100644 l4d2/config-templates/server.template.cfg create mode 100755 l4d2/update_server_details.sh create mode 100755 l4d2/zip-utils.sh diff --git a/base/Dockerfile b/base/Dockerfile index 06f7a1c..8653496 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,12 +1,12 @@ -ARG DISTRO="16.04" +ARG DISTRO="20.04" FROM ubuntu:${DISTRO} ARG TZ="Etc/UTC" -RUN sed -i 's/archive.ubuntu.com/au.archive.ubuntu.com/' /etc/apt/sources.list RUN apt-get update \ && apt-get dist-upgrade -y \ && apt-get install -y \ + git \ unzip \ p7zip-full\ curl\ diff --git a/docker_build.sh b/docker_build.sh index 69d7692..e5e8237 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -8,7 +8,7 @@ mkdir -p .cache if [[ -z $1 ]]; then echo Specify containers to run 'docker build . -t ARG --build-arg CACHE_DATE=$(date)' against/ - echo e.g. 'docker_build.sh tf2,l4d2' + echo e.g. 'docker_build.sh base,steamcmd,l4d2,l4d2-metamod' exit 1 fi @@ -16,35 +16,8 @@ for i in $(echo $1 | sed "s/,/ /g") do echo "Building ${i}..." cd ${i} - if [[ -f ".cache-info" ]]; then - echo "Found '.cache-info'!" - CACHE_DIR="${BASE_DIR}/.cache" - GAME_CACHE_DIR="${CACHE_DIR}/${i}" - if [[ -d "${GAME_CACHE_DIR}" ]]; then - echo "Moving existing master '.cache' for ${i}." - rm -fr .cache - mv "${GAME_CACHE_DIR}" .cache - else - echo "No existing master '.cache' for ${i} found." - fi - docker build --progress=plain . -t ${i} || exit 1 - SHORT_UUID=$(uuidgen) - SHORT_UUID=${SHORT_UUID%%-*} - BUILD_ID="$i-build-${SHORT_UUID}" - docker run -id --name "${BUILD_ID}" --entrypoint=/bin/bash $i \ - -c "read" || exit 1 - DIRECTORY_TO_CACHE=$(head -n 1 .cache-info) - echo "Caching contents of ${DIRECTORY_TO_CACHE}..." - docker cp "${BUILD_ID}":${DIRECTORY_TO_CACHE} "${CACHE_DIR}" || exit 1 - rm -fr .cache - echo "Killing build image..." - docker kill "${BUILD_ID}" || exit 1 - docker rm "${BUILD_ID}" || exit 1 - else - echo "No '.cache-info' found. Consider adding one to cache the contents of the image built to re-use later." - echo "Using CACHE_DATE in case new version needs created for the old way of trying to re-use existing images..." - docker build . --build-arg CACHE_DATE="$(date)" -t ${i} - fi + echo "Using CACHE_DATE in case updates have been made..." + docker build . --build-arg CACHE_DATE="$(date)" -t ${i} cd ${BASE_DIR} done diff --git a/l4d2-abd/Dockerfile b/l4d2-abd/Dockerfile deleted file mode 100644 index e4b77e4..0000000 --- a/l4d2-abd/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM l4d2-metamod - -WORKDIR /steam/l4d2/ -USER steam -ADD download.sh . - -RUN ./download.sh -RUN mkdir -p /steam/l4d2/left4dead2/addons/sourcemod/extensions/ -RUN unzip l4dtoolz.zip -d /steam/l4d2/left4dead2/addons \ - && unzip l4downtown.zip -d /steam/l4d2/left4dead2/addons/sourcemod/ - -ADD start.sh . -ENTRYPOINT ["./start.sh"] diff --git a/l4d2-abd/README.md b/l4d2-abd/README.md deleted file mode 100644 index 8ca86bd..0000000 --- a/l4d2-abd/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Left 4 Dead 2 - More Slots - -Left 4 Dead 2 server configuration for increasing the default player limits for the various modes (e.g. 8 player campaign, 8v8 versus). - -This also scales the difficulty instead of just allowing more to connect. - -Read the [ABM: A MultiSlots / SuperVersus Alternative plugin](https://forums.alliedmods.net/showthread.php?t=291562) page for more information. - -## Plugins - -Includes the following plugins: - -* [ABM: A MultiSlots / SuperVersus Alternative](https://forums.alliedmods.net/showthread.php?t=291562) -* [L4DToolZ Metamod plugin](https://forums.alliedmods.net/showthread.php?t=93600) -* [Force Mission Changer + Voting System](https://forums.alliedmods.net/showthread.php?p=2409561) - -## Environment variables - -* Same as the l4d2-metamod environment variables diff --git a/l4d2-abd/download.sh b/l4d2-abd/download.sh deleted file mode 100755 index 5308b5f..0000000 --- a/l4d2-abd/download.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# ABM: A MultiSlots / SuperVersus Alternative -# https://forums.alliedmods.net/showthread.php?t=291562 -curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/abm.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=168280&d=1517350697' -curl -o /steam/l4d2/left4dead2/addons/sourcemod/gamedata/abm.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=168279&d=1517350697' - -# Force Mission Changer + Voting System (Rewritten) -# https://forums.alliedmods.net/showthread.php?p=2409561 -curl -o /steam/l4d2/left4dead2/addons/sourcemod/plugins/fmc+vs-l4d2.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=165897&d=1507128318' - -# Left4Downtown -# https://forums.alliedmods.net/showthread.php?t=91132 -curl -o l4downtown.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=144262&d=1429173388' - -# L4DToolZ Metamod plugin (l4d1 & l4d2) -# https://forums.alliedmods.net/showthread.php?t=93600 -curl -o l4dtoolz.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=122230&d=1373147952' diff --git a/l4d2-abd/start.sh b/l4d2-abd/start.sh deleted file mode 100755 index 63c2846..0000000 --- a/l4d2-abd/start.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" -[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 -[[ -z "$MAP" ]] && MAP="c1m4_atrium" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="16" -[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - 8v8 Versus" -[[ -z $VERSUS_TEAM_LIMIT ]] && VERSUS_TEAM_LIMIT="8" - -# abm config -[[ -z $ABM_EXTRAPLAYERS ]] && ABM_EXTRAPLAYERS="4" -[[ -z $ABM_MINPLAYERS ]] && ABM_MINPLAYERS="1" -[[ -z $ABM_OFFERTAKEOVER ]] && ABM_OFFERTAKEOVER="1" - -# mp config - -# Create config file -cat </steam/l4d2/left4dead2/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -sv_allow_lobby_connect_only $ENABLE_LOBBY -sm_cvar sv_maxplayers $MAX_PLAYERS -sm_cvar sv_removehumanlimit 1 -sm_cvar sv_force_unreserved 1 -sm_cvar fmc+vs_l4d(2)_enable 1 -EOF - -#create abm config file -cat < /steam/l4d2/left4dead2/cfg/sourcemod/abm.cfg -abm_extraplayers = "$ABM_EXTRAPLAYERS" -abm_minplayers = "$ABM_MINPLAYERS" -abm_identityfix = "1" - -abm_offertakeover = "$ABM_OFFERTAKEOVER" -EOF - -echo $FULL_ADMINS > left4dead2/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2-metamod/.gitignore b/l4d2-metamod/.gitignore new file mode 100644 index 0000000..6e277c0 --- /dev/null +++ b/l4d2-metamod/.gitignore @@ -0,0 +1 @@ +admins_simple.ini \ No newline at end of file diff --git a/l4d2-metamod/Dockerfile b/l4d2-metamod/Dockerfile index e10d064..bcd4bb7 100644 --- a/l4d2-metamod/Dockerfile +++ b/l4d2-metamod/Dockerfile @@ -1,15 +1,26 @@ FROM l4d2 +USER root +RUN apt-get update; apt-get install -y lib32gcc1 lib32stdc++6 + WORKDIR /steam/l4d2/ USER steam -ADD download.sh . -RUN ./download.sh -RUN tar -xf mm*.tar.gz -C left4dead2/ && \ - tar -xf sourcemod*.tar.gz -C left4dead2/ +ENV LEFT4DEAD2_DIR "/steam/l4d2/left4dead2" +ENV ADDONS_DIR "${LEFT4DEAD2_DIR}/addons" +ENV SOURCEMOD_DIR "${ADDONS_DIR}/sourcemod" +ENV SOURCEMOD_EXTENSIONS_DIR "${SOURCEMOD_DIR}/extensions" +ENV SOURCEMOD_PLUGINS_DIR "${SOURCEMOD_DIR}/plugins" + +RUN mkdir -p "${SOURCEMOD_EXTENSIONS_DIR}/" +RUN mkdir -p "${SOURCEMOD_PLUGINS_DIR}/" + +COPY download.sh . +RUN ./download.sh -ADD metamod.vdf left4dead2/ +COPY metamod.vdf left4dead2/ +COPY admins_simple.ini "${SOURCEMOD_DIR}/configs/admins_simple.ini" -ADD start.sh . +RUN rm /steam/l4d2/left4dead2/addons/sourcemod/plugins/nextmap.smx ENTRYPOINT ["./start.sh"] diff --git a/l4d2-metamod/config-templates/admins_simple.template.ini b/l4d2-metamod/config-templates/admins_simple.template.ini new file mode 100644 index 0000000..9ecdf66 --- /dev/null +++ b/l4d2-metamod/config-templates/admins_simple.template.ini @@ -0,0 +1,45 @@ +// +// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES +// +// For each admin, you need three settings: +// "identity" "permissions" "password" +// +// For the Identity, you can use a SteamID or Name. To use an IP address, prepend a ! character. +// For the Permissions, you can use a flag string and an optional password. +// +// PERMISSIONS: +// Flag definitions are in "admin_levels.cfg" +// You can combine flags into a string like this: +// "abcdefgh" +// +// If you want to specify a group instead of a flag, use an @ symbol. Example: +// "@Full Admins" +// +// You can also specify immunity values. Two examples: +// "83:abcdefgh" //Immunity is 83, flags are abcdefgh +// "6:@Full Admins" //Immunity is 6, group is "Full Admins" +// +// Immunity values can be any number. An admin cannot target an admin with +// a higher access value (see sm_immunity_mode to tweak the rules). Default +// immunity value is 0 (no immunity). +// +// PASSWORDS: +// Passwords are generally not needed unless you have name-based authentication. +// In this case, admins must type this in their console: +// +// setinfo "KEY" "PASSWORD" +// +// Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD" +// is their password. With name based authentication, this must be done before +// changing names or connecting. Otherwise, SourceMod will automatically detect +// the password being set. +// +//////////////////////////////// +// Examples: (do not put // in front of real lines, as // means 'comment') +// +// "STEAM_0:1:16" "bce" //generic, kick, unban for this steam ID, no immunity +// "!127.0.0.1" "99:z" //all permissions for this ip, immunity value is 99 +// "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, generic, kick +// +//////////////////////////////// + \ No newline at end of file diff --git a/l4d2-metamod/download.sh b/l4d2-metamod/download.sh index 89bcc7e..e3c9b69 100755 --- a/l4d2-metamod/download.sh +++ b/l4d2-metamod/download.sh @@ -1,17 +1,32 @@ #!/bin/bash -MMVERSION=$( curl http://www.metamodsource.net/downloads.php | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +set -e -MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) - -curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION +source zip-utils.sh -SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" +tar -xf mm*.tar.gz -C "${LEFT4DEAD2_DIR}/" +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +tar -xf sourcemod*.tar.gz -C "${LEFT4DEAD2_DIR}/" + +# http://www.bailopan.net/stripper/ +# http://www.bailopan.net/stripper/files/stripper-1.2.2-linux.tar.gz +curl -o stripper.tar.gz 'http://www.bailopan.net/stripper/files/stripper-1.2.2-linux.tar.gz' +tar -xf stripper.tar.gz -C "${LEFT4DEAD2_DIR}/" -echo $SMVERSION -echo $SMMAJORVERSION +# Source Scramble (memory patching and allocation natives) +# https://forums.alliedmods.net/showthread.php?p=2657347 +curl -L https://github.com/nosoop/SMExt-SourceScramble/releases/download/0.7.0/package.tar.gz > SourceScramble.tar.gz +tar -xf SourceScramble.tar.gz -C "${LEFT4DEAD2_DIR}/" -SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" -curl -o $SMVERSION $SMURL +# [L4D1&2] Scene Processor +# https://forums.alliedmods.net/showpost.php?p=2766130&postcount=59 +curl -o sceneprocessor.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=192668&d=1639588615' +unzipAndMoveToDir sceneprocessor.zip "${LEFT4DEAD2_DIR}/" diff --git a/l4d2-metamod/start.sh b/l4d2-metamod/start.sh deleted file mode 100755 index 00f6606..0000000 --- a/l4d2-metamod/start.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" -[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 -[[ -z "$MAP" ]] && MAP="c1m4_atrium" -[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2 - MetaMod" - -# mp config - -# Create config file -cat </steam/l4d2/left4dead2/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -sv_allow_lobby_connect_only $ENABLE_LOBBY -EOF - -echo '$FULL_ADMINS' > left4dead2/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2-multislot/.gitignore b/l4d2-multislot/.gitignore new file mode 100644 index 0000000..ee1d511 --- /dev/null +++ b/l4d2-multislot/.gitignore @@ -0,0 +1,3 @@ +l4d_hp_laser.cfg +l4dinfectedbots.cfg +l4dmultislots.cfg \ No newline at end of file diff --git a/l4d2-multislot/Dockerfile b/l4d2-multislot/Dockerfile new file mode 100644 index 0000000..fb52bc8 --- /dev/null +++ b/l4d2-multislot/Dockerfile @@ -0,0 +1,17 @@ +FROM l4d2-metamod + +WORKDIR /steam/l4d2/ +USER steam + +COPY download.sh . +RUN ./download.sh + +COPY *.cfg "${LEFT4DEAD2_DIR}/cfg/sourcemod/" + +COPY update_config.sh . + +USER root +RUN chown -R steam:steam update_config.sh +USER steam + +ENTRYPOINT ["/bin/bash", "-c", "./update_config.sh && ./start.sh"] diff --git a/l4d2-multislot/README.md b/l4d2-multislot/README.md new file mode 100644 index 0000000..a23bfdf --- /dev/null +++ b/l4d2-multislot/README.md @@ -0,0 +1,7 @@ +# Left 4 Dead 2 - More Slots + +Left 4 Dead 2 server configuration for increasing the default player limits for the various modes (e.g. 8 player campaign, 8v8 versus). + +This also scales the difficulty instead of just allowing more to connect. + +## Plugins diff --git a/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg b/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg new file mode 100644 index 0000000..0552a23 --- /dev/null +++ b/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg @@ -0,0 +1,199 @@ +// 0 = Align the laser left-to-right per client eye angles. (lower performance) +// 1 = Align the laser to center. (better performance) +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_align_center "1" + +// Alpha of the laser beam HP. +// 0 = Invisible, 255 = Fully Visible. +// - +// Default: "240" +// Minimum: "0.000000" +// Maximum: "255.000000" +l4d_hp_laser_alpha "240" + +// Show the laser beam HP to the survivor attacker, by this amount of time in seconds, after hitting a special infected. +// 0 = OFF. +// - +// Default: "0.0" +// Minimum: "0.000000" +l4d_hp_laser_attack_delay "0.0" + +// Show a laser beam HP in white on "black and white" survivors. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_black_and_white "1" + +// Maximum render alpha that a client must be to hide the laser beam HP. +// Useful to hide it on invisible/transparent clients. +// -1 = OFF. +// - +// Default: "0" +// Minimum: "-1.000000" +// Maximum: "255.000000" +l4d_hp_laser_client_alpha_max "0" + +// Allow cookies for storing client preferences. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_cookies "1" + +// Enable/Disable the plugin. +// 0 = Disable, 1 = Enable. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_enable "1" + +// Minimum distance that a client must be from another client to see the laser beam HP. +// 0 = Always visible. +// - +// Default: "0" +// Minimum: "0.000000" +l4d_hp_laser_fade_distance "0" + +// Display a laser beam HP to fill the bar. +// Note: Disable this if you intend to show a lot of laser beams HP. The game limits the number of beams rendered at the same time when limit exceeds it may not draw then all. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_fill "1" + +// Alpha of the laser beam HP that fills the bar. +// 0 = Invisible, 255 = Fully Visible +// - +// Default: "40" +// Minimum: "0.000000" +// Maximum: "255.000000" +l4d_hp_laser_fill_alpha "40" + +// Should the laser beam HP on survivors render in gradient color. +// 0 = OFF. (Game colors: Green 40HP+, Yellow 39HP~25HP, Red 24HP-), 1 = Gradient Mode. +// Note: The Yellow color is defined by the "survivor_limp_health" game cvar. +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_gradient_color "0" + +// Height of the laser beam HP. +// - +// Default: "2.0" +// Minimum: "0.000000" +l4d_hp_laser_height "2.0" + +// Which teams infected can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_infected_team "3" + +// Width of the infected laser beam HP. +// - +// Default: "25.0" +// Minimum: "0.000000" +l4d_hp_laser_infected_width "25.0" + +// Model of the laser beam HP. +// - +// Default: "vgui/white_additive.vmt" +l4d_hp_laser_model "vgui/white_additive.vmt" + +// Which teams should multiply the laser beam HP alpha based on the client render alpha. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "2" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_multiply_alpha_team "2" + +// Render type used to draw the laser beams. +// 0 = Timer (0.1 seconds - less expensive), 1 = OnGameFrame (by frame - more expensive). +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_render_frame "0" + +// Which special infected should have a laser beam HP. +// 1 = SMOKER, 2 = BOOMER, 4 = HUNTER, 8 = SPITTER, 16 = JOCKEY, 32 = CHARGER, 64 = TANK. +// Add numbers greater than 0 for multiple options. +// Example: "127", enables laser beam HP for all SI. +// - +// Default: "64" +// Minimum: "0.000000" +// Maximum: "127.000000" +l4d_hp_laser_si "64" + +// Show a laser beam HP to the survivor only if the special infected is on sight. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_sight "1" + +// How many frames should skip while using l4d_hp_laser_render_type = "1" (OnGameFrame). Frames may vary depending on your tickrate. Using a higher value than 2 becomes slower than with the timer on default tick rate (30) +// - +// Default: "1" +// Minimum: "0.000000" +l4d_hp_laser_skip_frame "1" + +// Which teams spectators can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_spectator_team "3" + +// Which teams survivors can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_survivor_team "3" + +// Width of the survivor laser beam HP. +// - +// Default: "15.0" +// Minimum: "0.000000" +l4d_hp_laser_survivor_width "15.0" + +// Which teams should have a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_team "1" + +// Additional Z axis distance of laser beam HP based on client position. +// - +// Default: "85" +// Minimum: "0.000000" +l4d_hp_laser_z_axis "85" \ No newline at end of file diff --git a/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg b/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg new file mode 100644 index 0000000..eabf908 --- /dev/null +++ b/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg @@ -0,0 +1,164 @@ +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_commonlimit' each 'l4d_infectedbots_add_commonlimit_scale' players joins +l4d_infectedbots_add_commonlimit "2" + +// If server has more than 4+ alive players, zombie common limit = 'default_commonlimit' + [(alive players - 4) ÷ 'add_commonlimit_scale' × 'add_commonlimit']. +l4d_infectedbots_add_commonlimit_scale "1" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_max_specials' each 'l4d_infectedbots_add_specials_scale' players joins +l4d_infectedbots_add_specials "2" + +// If server has more than 4+ alive players, how many special infected = 'max_specials' + [(alive players - 4) ÷ 'add_specials_scale' × 'add_specials']. +l4d_infectedbots_add_specials_scale "2" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_tankhealth' each 'l4d_infectedbots_add_tankhealth_scale' players joins +l4d_infectedbots_add_tankhealth "500" + +// If server has more than 4+ alive players, how many Tank Health = 'default_tankhealth' + [(alive players - 4) ÷ 'add_tankhealth_scale' × 'add_tankhealth']. +l4d_infectedbots_add_tankhealth_scale "1" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_tank_limit' each 'l4d_infectedbots_add_tanklimit_scale' players joins +l4d_infectedbots_add_tanklimit "1" + +// If server has more than 4+ alive players, how many tanks on the field = 'tank_limit' + [(alive players - 4) ÷ 'add_tanklimit_scale' × 'add_tanklimit']. +l4d_infectedbots_add_tanklimit_scale "3" + +// If 1, adjust and overrides zombie common limit by this plugin. +l4d_infectedbots_adjust_commonlimit_enable "1" + +// Reduce certain value to maximum spawn timer based per alive player +l4d_infectedbots_adjust_reduced_spawn_times_on_player "1" + +// If 1, The plugin will adjust spawn timers depending on the gamemode +l4d_infectedbots_adjust_spawn_times "1" + +// If 1, adjust and overrides tank health by this plugin. +l4d_infectedbots_adjust_tankhealth_enable "1" + +// 0=Plugin off, 1=Plugin on. +l4d_infectedbots_allow "1" + +// If 1, announce current plugin status when the number of alive survivors changes. +l4d_infectedbots_announcement_enable "1" + +// Sets the limit for boomers spawned by the plugin +l4d_infectedbots_boomer_limit "2" + +// Sets the limit for chargers spawned by the plugin +l4d_infectedbots_charger_limit "2" + +// If 1, players can join the infected team in coop/survival/realism (!ji in chat to join infected, !js to join survivors) +l4d_infectedbots_coop_versus "1" + +// If 1, clients will be announced to on how to join the infected team +l4d_infectedbots_coop_versus_announce "1" + +// If 1, human infected player will spawn as ghost state in coop/survival/realism. +l4d_infectedbots_coop_versus_human_ghost_enable "1" + +// If 1, attaches red flash light to human infected player in coop/survival/realism. (Make it clear which infected bot is controlled by player) +l4d_infectedbots_coop_versus_human_light "1" + +// Sets the limit for the amount of humans that can join the infected team in coop/survival/realism +l4d_infectedbots_coop_versus_human_limit "2" + +// Players with these flags have access to join infected team in coop/survival/realism. (Empty = Everyone, -1: Nobody) +l4d_infectedbots_coop_versus_join_access "z" + +// If 1, tank will always be controlled by human player in coop/survival/realism. +l4d_infectedbots_coop_versus_tank_playable "0" + +// If 1, bots will only spawn when all other bot spawn timers are at zero +l4d_infectedbots_coordination "0" + +// Sets Default zombie common limit. +l4d_infectedbots_default_commonlimit "30" + +// Sets Default Health for Tank, Tank hp is affected by gamemode and difficulty (Example, Set Tank health 4000hp, but in Easy: 3000, Normal: 4000, Versus: 6000, Advanced/Expert: 8000) +l4d_infectedbots_default_tankhealth "4000" + +// Sets the limit for hunters spawned by the plugin +l4d_infectedbots_hunter_limit "2" + +// Toggle whether Infected HUD announces itself to clients. +l4d_infectedbots_infhud_announce "1" + +// Toggle whether Infected HUD is active or not. +l4d_infectedbots_infhud_enable "1" + +// The spawn timer in seconds used when infected bots are spawned for the first time in a map +l4d_infectedbots_initial_spawn_timer "10" + +// Sets the limit for jockeys spawned by the plugin +l4d_infectedbots_jockey_limit "2" + +// Amount of seconds before a special infected bot is kicked +l4d_infectedbots_lifespan "30" + +// Defines how many special infected can be on the map on all gamemodes(does not count witch on all gamemodes, count tank in all gamemode) +l4d_infectedbots_max_specials "2" + +// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all). +l4d_infectedbots_modes "" + +// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none). +l4d_infectedbots_modes_off "" + +// Turn on the plugin in these game modes. 0=All, 1=Coop/Realism, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together. +l4d_infectedbots_modes_tog "5" + +// If 1, spawn special infected before survivors leave starting safe room area. +l4d_infectedbots_safe_spawn "0" + +// Disable sm_zs in these gamemode (0: None, 1: coop/realism, 2: versus/scavenge, 4: survival, add numbers together) +l4d_infectedbots_sm_zs_disable_gamemode "6" + +// Sets the limit for smokers spawned by the plugin +l4d_infectedbots_smoker_limit "2" + +// The minimum of spawn range for infected in final stage rescue. (coop/realism only) +l4d_infectedbots_spawn_range_final "0" + +// The maximum of spawn range for infected. (default: 1500, coop/realism only) +l4d_infectedbots_spawn_range_max "2000" + +// The minimum of spawn range for infected. (default: 550, coop/realism only) +l4d_infectedbots_spawn_range_min "400" + +// Sets the max spawn time for special infected spawned by the plugin in seconds. +l4d_infectedbots_spawn_time_max "60" + +// Sets the minimum spawn time for special infected spawned by the plugin in seconds. +l4d_infectedbots_spawn_time_min "40" + +// If 1, Plugin will disable spawning infected bot when a tank is on the field. +l4d_infectedbots_spawns_disabled_tank "0" + +// Sets the limit for spitters spawned by the plugin +l4d_infectedbots_spitter_limit "2" + +// Sets the limit for tanks spawned by the plugin (does not affect director tanks) +l4d_infectedbots_tank_limit "1" + +// If 1, still spawn tank in final stage rescue (does not affect director tanks) +l4d_infectedbots_tank_spawn_final "1" + +// When each time spawn S.I., how much percent of chance to spawn tank +l4d_infectedbots_tank_spawn_probability "5" + +// If 1, The plugin will force all players to the infected side against the survivor AI for every round and map in versus/scavenge +l4d_infectedbots_versus_coop "0" + +// Amount of seconds before a witch is kicked. (only remove witches spawned by this plugin) +l4d_infectedbots_witch_lifespan "200" + +// Sets the limit for witches spawned by the plugin (does not affect director witches) +l4d_infectedbots_witch_max_limit "6" + +// If 1, still spawn witch in final stage rescue +l4d_infectedbots_witch_spawn_final "0" + +// Sets the max spawn time for witch spawned by the plugin in seconds. +l4d_infectedbots_witch_spawn_time_max "120.0" + +// Sets the mix spawn time for witch spawned by the plugin in seconds. +l4d_infectedbots_witch_spawn_time_min "90.0" \ No newline at end of file diff --git a/l4d2-multislot/config-templates/l4dmultislots.template.cfg b/l4d2-multislot/config-templates/l4dmultislots.template.cfg new file mode 100644 index 0000000..ce72626 --- /dev/null +++ b/l4d2-multislot/config-templates/l4dmultislots.template.cfg @@ -0,0 +1,31 @@ +// When 5+ new player joins the server but no any bot can be taken over, the player will appear as a dead survivor if survivors have left start safe area for at least X seconds. (0=Always spawn alive bot for new player) +l4d_multislots_alive_bot_time "0" + +// Setup time interval the instruction message to spectator.(0=off) +l4d_multislots_spec_message_interval "25" + +// Kick AI Survivor bots if numbers of survivors has exceeded the certain value. (does not kick real player, minimum is 4) +l4d_multislots_max_survivors "4" + +// If 1, Spawn 5+ survivor bots when round starts. (Numbers depends on Convar l4d_multislots_max_survivors) +l4d_multislots_spawn_survivors_roundstart "0" + +// If 1, when same player reconnect the server or rejoin survivor team but no any bot can be taken over, give him a dead bot. (0=Always spawn alive bot for same player) +l4d_multislots_no_second_free_spawn "0" + +// Amount of HP a new 5+ Survivor will spawn with (Def 80) +l4d_multislots_respawnhp "80" + +// Amount of buffer HP a new 5+ Survivor will spawn with (Def 20) +l4d_multislots_respawnbuffhp "20" + +// (L4D2) First slot weapon for new 5+ Survivor (1-Autoshot, 2-SPAS, 3-M16, 4-SCAR, 5-AK47, 6-SG552, 7-Mil Sniper, 8-AWP, 9-Scout, 10=Hunt Rif, 11=M60, 12=GL, 13-SMG, 14-Sil SMG, 15=MP5, 16-Pump Shot, 17=Chrome Shot, 18=Rand T1, 19=Rand T2, 20=Rand T3, 0=off) +// GL = Grenade Launcher +// Rand T3 = M60 or Grenade Launcher +l4d_multislots_firstweapon "19" + +// (L4D2) Second slot weapon for new 5+ Survivor (1- Dual Pistol, 2-Magnum, 3-Chainsaw, 4-Fry Pan, 5-Katana, 6-Shovel, 7-Golfclub, 8-Machete, 9-Cricket, 10=Fireaxe, 11=Knife, 12=Bball Bat, 13=Crowbar, 14=Pitchfork, 15=Guitar, 16=Random, 0=Only Pistol) +l4d_multislots_secondweapon "16" + +// (L4D2) Third slot weapon for new 5+ Survivor (1 - Moltov, 2 - Pipe Bomb, 3 - Bile Jar, 4=Random, 0=off) +l4d_multislots_thirdweapon "4" \ No newline at end of file diff --git a/l4d2-multislot/download.sh b/l4d2-multislot/download.sh new file mode 100755 index 0000000..70fa751 --- /dev/null +++ b/l4d2-multislot/download.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +set -e + +source zip-utils.sh + +# [L4D(2)] MultiSlots Improved Version 4.0 (2021/8/25) +# https://forums.alliedmods.net/showpost.php?p=2715546&postcount=249 +curl -o l4dmultislots.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=194715&d=1650125518' +unzipAndMoveToDir l4dmultislots.zip "${SOURCEMOD_DIR}/" "l4dmultislots" + +# Left 4 DHooks Direct +# https://forums.alliedmods.net/showthread.php?t=321696 +curl -o l4dhooks.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=195507&d=1660658623' +unzipAndMoveToDir l4dhooks.zip "${ADDONS_DIR}/" + +# L4DToolZ Metamod plugin (l4d1 & l4d2) +# https://forums.alliedmods.net/showpost.php?p=2761018&postcount=1502 +curl -o l4dtoolz.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=191943&d=1634657491' +unzipAndMoveToDir l4dtoolz.zip "${LEFT4DEAD2_DIR}/" + +# Left 4 Dead 2 - CreateSurvivorBot +# https://forums.alliedmods.net/showthread.php?p=2729883 +curl -o CreateSurvivorBot.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=185769&d=1608745336' +unzipAndMoveToDir CreateSurvivorBot.zip "${SOURCEMOD_DIR}/" + +# [INC] Multi Colors +# https://forums.alliedmods.net/showthread.php?t=247770 +curl -L 'https://github.com/Bara/Multi-Colors/archive/refs/heads/master.zip' > multicolors.zip +unzipAndMoveToDir multicolors.zip "${ADDONS_DIR}/" "Multi-Colors-master/addons" + + +# Various fixes for 8 player Coop +# Following guide at https://forums.alliedmods.net/showpost.php?p=2756041&postcount=220 + +# LEFT 4 FIX + +# [L4D2]Defib_Fix[Left 4 Fix][11/05/2021] +# https://forums.alliedmods.net/showthread.php?p=2647018 +curl -o Defib_Fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=189234&d=1620748700' +unzipLzmaAndMoveToDir Defib_Fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2]Charger_Collision_patch[Left 4 Fix][06/04/2022] +# https://forums.alliedmods.net/showthread.php?t=315482 +curl -o Charger_Collision_patch.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=194569&d=1649300386' +unzipLzmaAndMoveToDir Charger_Collision_patch.zip "${ADDONS_DIR}/" + +# [L4D & L4D2]Witch fixes[Left 4 Fix] +# https://forums.alliedmods.net/showthread.php?p=2647014 +curl -o witchfixes.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=193451&d=1643848983' +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_allow_in_safezone" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/Witch_Double_Startle_Fix" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_prevent_target_loss" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_target_patch" + +# [L4D & L4D2]Physics Object Pushfix[Left 4 Fix] +# https://forums.alliedmods.net/showthread.php?p=2705656#post2705656 +curl -o physics_object_pushfix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=183790&d=1600989720' +unzipLzmaAndMoveToDir physics_object_pushfix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D1 & L4D2]Survivor_AFK_Fix[Left 4 Fix][25/09/2020] +# https://forums.alliedmods.net/showthread.php?p=2714236 +curl -o survivor_afk_fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=189803&d=1623834645' +unzipLzmaAndMoveToDir survivor_afk_fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019] +# https://forums.alliedmods.net/showthread.php?p=2669850 +curl -o l4d2_levelchanging.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=178784&d=1576565208' +unzipLzmaAndMoveToDir l4d2_levelchanging.zip "${LEFT4DEAD2_DIR}/" + +# OTHER FIXES + +# [L4D1?/2] 5+ Survivor Friendly Fire Quote Fix +# https://forums.alliedmods.net/showthread.php?t=321127 +curl -o SceneAdjustments.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=179550' +mv SceneAdjustments.smx "${SOURCEMOD_PLUGINS_DIR}/" + +# [L4D2] Upgrade Pack Fixes +# https://forums.alliedmods.net/showthread.php?t=322824 +curl -o lfd_both_fixUpgradePack.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=190948' +mv lfd_both_fixUpgradePack.smx "${SOURCEMOD_PLUGINS_DIR}/" +curl -o upgradepackfix.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=180585&d=1586095821' +mv upgradepackfix.txt "${SOURCEMOD_DIR}/gamedata/" + +# Pre-Update Talker +# https://steamcommunity.com/sharedfiles/filedetails/?id=2247536739 +curl -o 'myl4d2addons_original_talker.vpk' https://steamusercontent-a.akamaihd.net/ugc/1713043370483788074/0976B1E654208FA422B6B99A4AD1FA23764071FC/ +mv myl4d2addons_original_talker.vpk "${ADDONS_DIR}/" + +# L4D2-PLUGINS + +# https://github.com/fbef0102/L4D2-Plugins +git clone 'https://github.com/fbef0102/L4D2-Plugins' +# L4D2 coop save weapon +# https://github.com/fbef0102/L4D2-Plugins/tree/master/l4d2_ty_saveweapons +moveToDir "L4D2-Plugins/l4d2_ty_saveweapons" "${SOURCEMOD_DIR}" + +# [L4D2]Character_manager (1.4.1 - 22/09/2019 ) +# https://forums.alliedmods.net/showthread.php?t=309601 +curl -o l4d2_character_manager.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=177489&d=1569152696' +mv l4d2_character_manager.smx "${SOURCEMOD_PLUGINS_DIR}/" +curl -o l4d2_character_manager.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=171266&d=1536205521' +mv l4d2_character_manager.txt "${SOURCEMOD_DIR}/gamedata" +curl -o Stripper_passingfix.7z 'https://forums.alliedmods.net/attachment.php?attachmentid=171117&d=1535074649' +un7zipAndMoveToDir Stripper_passingfix.7z "${SOURCEMOD_DIR}/" + +# 8 survivors in the rescue vehicle +# https://forums.alliedmods.net/showpost.php?p=2726779&postcount=38 +curl -o 8_survivors_stripper.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=185247&d=1606736574' +unzipAndMoveToDir 8_survivors_stripper.zip "${ADDONS_DIR}/stripper/maps" + +# [L4D2] Team Kill Reactions Vocalize Fix +# https://forums.alliedmods.net/showthread.php?p=2273230 +curl -o TeamkillReactionsFix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=143150&d=1426251346' +unzipAndMoveToDir TeamkillReactionsFix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2] Survivor Clones Hunter Pounced Warning Fix +# https://forums.alliedmods.net/showthread.php?p=2202855 +curl -o survivor_hunter_pounced_clones_fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=138291&d=1411731048' +unzipAndMoveToDir survivor_hunter_pounced_clones_fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D1 & L4D2] HP Laser [v1.0.9 | 14-November-2021] +# https://forums.alliedmods.net/showthread.php?p=2736513 +curl -o l4d_hp_laser.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=189361' +mv l4d_hp_laser.smx "${SOURCEMOD_PLUGINS_DIR}/" + +# Infected Bots Control Improved Version 2.7.3 (2022/8/18 ) +# https://forums.alliedmods.net/showthread.php?p=2699220#post2699220 +curl -o l4dinfectedbots.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=196355&d=1660780819' +unzipAndMoveToDir l4dinfectedbots.zip "${SOURCEMOD_DIR}/" "l4dinfectedbots" diff --git a/l4d2-multislot/update_config.sh b/l4d2-multislot/update_config.sh new file mode 100755 index 0000000..dad573b --- /dev/null +++ b/l4d2-multislot/update_config.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +set -e + +export MAX_PLAYERS=${MAX_PLAYERS:-8} + +# update config file +cat <> /steam/l4d2/left4dead2/cfg/server.cfg +upgrade_denied_sound "1" - Play sound when ammo already used +upgrade_block_glauncher "1" - "Block use of special ammo with grenade launcher (0 - Allow | 1 - Block any | 2 - Block incendiary | 3 - Block explosive) +upgrade_incendiary_multi "1.0" - Incendiary ammo multiplier on pickup +upgrade_explosive_multi "1.0" - Explosive ammo multiplier on pickup + +sv_maxplayers "${MAX_PLAYERS}" - max human players that can join your server. -1 to disable and use standart check (range 0 to 32) +sv_removehumanlimit "1" - remove kick for players when they are more than 8 for vs and 4 for coop(0 to disable, 1 to enable) +sv_force_unreserved "0" - if you set it to 1 before connection from lobby your server will stay unreserved and allow players to connect using connect command, this command sets sv_allow_lobby_connect_only 0, so you need to create lobby using ms_force_dedicated_server and then connect to server, your friends may see wrong max players in friend lobby, so give them ip. + +- keep this at the end +sm plugins reload sceneadjustments.smx +EOF + +# create l4d2_character_manager config +cat < /steam/l4d2/left4dead2/cfg/sourcemod/l4d2_character_manager.cfg +l4d2_character_manager_version + +// Should enable identity fix for players(NOT BOTS) 0 = (disable) 1 = (enabled) +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d2_identity_fix "1" + +// survivor set you wish to use, 0 = (use map default), 1 = (l4d1), 2 = (l4d2), 3 = (use both) +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "3.000000" +l4d2_survivor_set "3" + +// Should manage people aswell as bots? 0 = (disable) 1 = (enabled) (Will overwrite identityfix when taking over a bot) +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d2_manage_people "0" +EOF diff --git a/l4d2/.cache-info b/l4d2/.cache-info deleted file mode 100644 index e5c0a12..0000000 --- a/l4d2/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/l4d2 \ No newline at end of file diff --git a/l4d2/.gitignore b/l4d2/.gitignore new file mode 100644 index 0000000..d1edc99 --- /dev/null +++ b/l4d2/.gitignore @@ -0,0 +1 @@ +server.cfg \ No newline at end of file diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 7c35a20..96bfc60 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -7,19 +7,25 @@ RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6 ENV GAME=l4d2 ENV APP_ID=222860 -RUN mkdir -p /steam/${GAME}/.cache/ \ - && touch /steam/${GAME}/.cache/empty WORKDIR /steam/${GAME}/ -COPY .cache . -RUN chown -R steam /steam/${GAME}/ \ - && mv .cache/* . \ - && rm -fr .cache +RUN chown -R steam /steam/${GAME}/ + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +COPY update_server_details.sh . +COPY zip-utils.sh . + +COPY server.cfg left4dead2/cfg/server.cfg COPY start.sh . +USER root +RUN chown steam:steam left4dead2/cfg/server.cfg USER steam -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit - ENTRYPOINT ["./start.sh"] diff --git a/l4d2/config-templates/server.template.cfg b/l4d2/config-templates/server.template.cfg new file mode 100644 index 0000000..01e386e --- /dev/null +++ b/l4d2/config-templates/server.template.cfg @@ -0,0 +1,83 @@ +hostname "Your Server Name Here" +rcon_password yourpass + +// This states how players should contact you +sv_contact your@email.com + +// # of rounds to play (versus) +mp_roundlimit 2 + +// Use a search key to find the server in the lobby +//sv_search_key "" +//sv_tags "" + +// STEAM GROUP +sv_steamgroup GROUPIDHERE + +//FRIENDLY FIRE 1=ON 0=OFF +sm_cvar survivor_friendly_fire_factor_easy 1 +sm_cvar survivor_friendly_fire_factor_expert 1 +sm_cvar survivor_friendly_fire_factor_hard 1 +sm_cvar survivor_friendly_fire_factor_normal 1 + +// CHEAT/CONFIG +sv_lan 0 +sv_cheats 0 +sv_consistency 1 +sv_maxcmdrate 101 +sv_maxrate 30000 + +//MOTD +motd_enabled 1 + +//GAME MODE +sv_gametypes "coop, versus, mutation" +sm_cvar mp_gamemode coop + +//DIFFICULTY +z_difficulty Impossible + +//LOBBY CONNECT +sv_allow_lobby_connect_only 0 + +//Game Settings + +mp_disable_autokick 1 //(command)prevents a userid from being auto-kicked (Usage mp_diable_autokick ) +sv_allow_wait_command 0 //default 1; Allow or disalow the wait command on clients connected to this server. +sv_alternateticks 0 //defulat 0; (singleplayer)If set, server only simulates entities on even numbered ticks. +sv_clearhinthistory 0 //(command)Clear memory of server side hint displayed to the player. +sv_consistency 0 //default 1; Whether the server enforces file consistency for critical files +sv_pausable 0 //default 0; is the server pausable +sv_forcepreload 1 //default 0; Force server side preloading +sv_pure_kick_clients 0 //default 1; If set to 1, the server will kick clients with mismatchng files. Otherwise, it will issue a warning to the client. +sv_pure 0 //If set to 1, server will force all client files execpt whitelisted ones (in pure_server_whitelist.txt) to match server's files. + //If set to 2, the server will force all clietn files to come from steam and not load pure_server_whilelist.txt. Set to 0 for disabled. + +// Communication + +sv_voiceenable 1 //default 1; enable/disable voice comm +sv_alltalk 1 //default 0; Players can hear all other players' voice communication, no team restrictions + +// Logging +log on //Creates a logfile (on | off) +sv_logecho 0 //default 0; Echo log information to the console. +sv_logfile 1 //default 1; Log server information in the log file. +sv_log_onefile 0 //default 0; Log server information to only one file. +sv_logbans 1 //default 0;Log server bans in the server logs. +sv_logflush 0 //default 0; Flush the log files to disk on each write (slow). +sv_logsdir logs //Folder in the game directory where server logs will be stored. + +// Bans +// execute banned.cfgs at server start. Optimally at launch commandline. +exec banned_user.cfg //loads banned users' ids +exec banned_ip.cfg //loads banned users' ips +writeip // Save the ban list to banned_ip.cfg. +writeid // Wrties a list of permanently-banned user IDs to banned_user.cfg. + +//Network Tweaks - Increase network performance + +rate 10000 //default 10000; Max bytes/sec the host can recieve data +sv_minrate 15000 //default "5000"; Min bandwidth rate allowed on server, 0 = unlimited +sv_maxrate 30000 //default "0"; Max bandwidth rate allowed on server, 0 = unlimited +sv_mincmdrate 20 //default 0; This sets the minimum value for cl_cmdrate. 0 = unlimited [cevo=67] +sv_maxcmdrate 33 //default 40; (If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate. [cevo=101] diff --git a/l4d2/start.sh b/l4d2/start.sh index e99365b..9a42957 100755 --- a/l4d2/start.sh +++ b/l4d2/start.sh @@ -1,25 +1,14 @@ #!/bin/bash +set -e + # local vars [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ $LAN -ge 1 ]] && ENABLE_LOBBY="0" || ENABLE_LOBBY="1" [[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 [[ -z "$MAP" ]] && MAP="c1m4_atrium" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" +[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Left 4 Dead 2" - -# mp config - -# Create config file -cat </steam/l4d2/left4dead2/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -sv_allow_lobby_connect_only $ENABLE_LOBBY -EOF +./update_server_details.sh -exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ +exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2/update_server_details.sh b/l4d2/update_server_details.sh new file mode 100755 index 0000000..1a052dc --- /dev/null +++ b/l4d2/update_server_details.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +export HOSTNAME="${HOSTNAME:-My L4D2 Server}" +export SV_CONTACT="${SV_CONTACT:-your@email.com}" +export LAN="${LAN:-0}" +export MP_GAMEMODE="${MP_GAMEMODE:-coop}" +export DIFFICULTY="${DIFFICULTY:-hard}" +export MAX_PLAYERS="${MAX_PLAYERS:-8}" +export PAUSABLE="${PAUSABLE:-0}" +export SV_VOICE_ENABLE="${SV_VOICE_ENABLE:-1}" + +sed -i "s/hostname.\+/hostname ${HOSTNAME}/g" left4dead2/cfg/server.cfg +sed -i "s/sv_lan.\+/sv_lan ${LAN}/g" left4dead2/cfg/server.cfg +sed -i "s/sm_cvar mp_gamemode .\+/sm_cvar mp_gamemode ${MP_GAMEMODE}/g" left4dead2/cfg/server.cfg +sed -i "s/z_difficulty.\+/z_difficulty ${DIFFICULTY}/g" left4dead2/cfg/server.cfg + +sed -i "s/^l4d_maxplayers.\+/l4d_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sv_maxplayers.\+/sv_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sm_cvar l4d_maxplayers.\+/sm_cvar l4d_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg + +sed -i "s/sm_cvar l4d_survivor_limit.\+/sm_cvar l4d_survivor_limit "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sv_pausable.\+/sv_pausable ${PAUSABLE}/g" left4dead2/cfg/server.cfg +sed -i "s/sv_voiceenable.\+/sv_voiceenable ${SV_VOICE_ENABLE}/g" left4dead2/cfg/server.cfg diff --git a/l4d2/zip-utils.sh b/l4d2/zip-utils.sh new file mode 100755 index 0000000..56b92fa --- /dev/null +++ b/l4d2/zip-utils.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +export TEMP_DIR="${LEFT4DEAD2_DIR}/tmp" +mkdir -p "${TEMP_DIR}" + +function moveToDir { + local lWorkingDir=$(pwd) + + local lSource="$1" + local lDestination="$2" + + echo "rsync from $lSource to $lDestination" + + cd "${lSource}" + rsync -av --stats --progress . "${lDestination}" + cd "${lWorkingDir}" + + rm -fr "${lSource}" +} + +function unzipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + unzip -o "${lArchive}" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + unzip -o "${lArchive}" "${lArchiveDir}/*" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function un7zipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Un7zipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function unzipLzmaAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping LZMA $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index 6c39bcb..19b3284 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -12,5 +12,4 @@ WORKDIR /steam/steamcmd_linux RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz RUN tar -xf steamcmd_linux.tar.gz - RUN ./steamcmd.sh +login anonymous +quit From 94a98f9908fff2acdc645162dc8204e6d6b0ce26 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 26 Jul 2024 11:47:28 +0100 Subject: [PATCH 30/55] Update SCP EXILED and plugins --- scpsl-exiled/download.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scpsl-exiled/download.sh b/scpsl-exiled/download.sh index 2cf54fe..dae2bb7 100755 --- a/scpsl-exiled/download.sh +++ b/scpsl-exiled/download.sh @@ -1,19 +1,16 @@ #!/bin/bash # https://github.com/Exiled-Team/EXILED/releases -curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/5.2.2/Exiled.tar.gz' +curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/8.9.11/Exiled.tar.gz' # https://github.com/Exiled-Team/Common-Utils - curl -LO 'https://github.com/Exiled-Team/Common-Utils/releases/download/6.2.0/Common_Utilities.dll' + curl -LO 'https://github.com/Exiled-Team/Common-Utils/releases/download/7.1.1/Common.Utilities.dll' # https://github.com/Michal78900/RespawnTimer - curl -LO 'https://github.com/Michal78900/RespawnTimer/releases/download/v3.1.0/RespawnTimer.dll' - -# https://github.com/VersLugia/ClassBroadcastReborn - curl -LO 'https://github.com/VersLugia/ClassBroadcastReborn/releases/download/1.1/ClassBroadcastReborn.dll' + curl -LO 'https://github.com/Michal78900/RespawnTimer/releases/download/v4.0.4/RespawnTimer.dll' # https://github.com/babyboucher/RPNames - curl -LO 'https://github.com/babyboucher/RPNames/releases/download/v1.8.0/RPNames.dll' + curl -LO 'https://github.com/1EnesBaturKaza/RPNames/releases/download/v2.2.0/RPNames.dll' # https://github.com/DGvagabond/SCP-008-X curl -LO 'https://github.com/DGvagabond/SCP-008-X/releases/download/3.1.2/SCP008X.dll' From 2f5354fe4d1da81d46d3037ce3fd201b658333c9 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:39:37 +0100 Subject: [PATCH 31/55] set noninteractive for base --- base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/base/Dockerfile b/base/Dockerfile index 8653496..c309b52 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -3,6 +3,7 @@ ARG DISTRO="20.04" FROM ubuntu:${DISTRO} ARG TZ="Etc/UTC" +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get dist-upgrade -y \ && apt-get install -y \ From 5931eaf82c0eea59ab07140118364443ad6d9a69 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:40:14 +0100 Subject: [PATCH 32/55] fix l4d2 and multislot after mod updates --- l4d2-multislot/download.sh | 36 ++++++++++++++++-------------------- l4d2/Dockerfile | 7 ++++++- l4d2/zip-utils.sh | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/l4d2-multislot/download.sh b/l4d2-multislot/download.sh index 70fa751..53e4283 100755 --- a/l4d2-multislot/download.sh +++ b/l4d2-multislot/download.sh @@ -6,7 +6,7 @@ source zip-utils.sh # [L4D(2)] MultiSlots Improved Version 4.0 (2021/8/25) # https://forums.alliedmods.net/showpost.php?p=2715546&postcount=249 -curl -o l4dmultislots.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=194715&d=1650125518' +curl -o l4dmultislots.zip 'https://web.archive.org/web/20220412091610if_/https://forums.alliedmods.net/attachment.php?s=cd319686aceb67ab3b0f13e22acaf327&attachmentid=193689&d=1644757794' unzipAndMoveToDir l4dmultislots.zip "${SOURCEMOD_DIR}/" "l4dmultislots" # Left 4 DHooks Direct @@ -35,37 +35,37 @@ unzipAndMoveToDir multicolors.zip "${ADDONS_DIR}/" "Multi-Colors-master/addons" # LEFT 4 FIX -# [L4D2]Defib_Fix[Left 4 Fix][11/05/2021] +# [L4D2]Defib_Fix[Left 4 Fix][28/02/2023] # https://forums.alliedmods.net/showthread.php?p=2647018 -curl -o Defib_Fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=189234&d=1620748700' +curl -o Defib_Fix.zip 'https://web.archive.org/web/20240609154929if_/https://forums.alliedmods.net/attachment.php?attachmentid=199744&d=1677587553' unzipLzmaAndMoveToDir Defib_Fix.zip "${LEFT4DEAD2_DIR}/" -# [L4D2]Charger_Collision_patch[Left 4 Fix][06/04/2022] +# [L4D2]Charger_Collision_patch[Left 4 Fix][05/03/2024] # https://forums.alliedmods.net/showthread.php?t=315482 -curl -o Charger_Collision_patch.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=194569&d=1649300386' +curl -o Charger_Collision_patch.zip 'https://web.archive.org/web/20240614133204if_/https://forums.alliedmods.net/attachment.php?attachmentid=203585&d=1709629833' unzipLzmaAndMoveToDir Charger_Collision_patch.zip "${ADDONS_DIR}/" -# [L4D & L4D2]Witch fixes[Left 4 Fix] +# [L4D & L4D2]Witch fixes[Left 4 Fix][29/05/2024] # https://forums.alliedmods.net/showthread.php?p=2647014 -curl -o witchfixes.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=193451&d=1643848983' +curl -o witchfixes.zip 'https://web.archive.org/web/20240609232653if_/https://forums.alliedmods.net/attachment.php?attachmentid=204480&d=1717034682' unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_allow_in_safezone" unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/Witch_Double_Startle_Fix" unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_prevent_target_loss" unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_target_patch" -# [L4D & L4D2]Physics Object Pushfix[Left 4 Fix] +# [L4D & L4D2]Physics Object Pushfix[Left 4 Fix][28/02/2023] # https://forums.alliedmods.net/showthread.php?p=2705656#post2705656 -curl -o physics_object_pushfix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=183790&d=1600989720' +curl -o physics_object_pushfix.zip 'https://web.archive.org/web/20240616022730if_/https://forums.alliedmods.net/attachment.php?attachmentid=183790&d=1600989720' unzipLzmaAndMoveToDir physics_object_pushfix.zip "${LEFT4DEAD2_DIR}/" -# [L4D1 & L4D2]Survivor_AFK_Fix[Left 4 Fix][25/09/2020] +# [L4D1 & L4D2]Survivor_AFK_Fix[Left 4 Fix][28/02/2023] # https://forums.alliedmods.net/showthread.php?p=2714236 -curl -o survivor_afk_fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=189803&d=1623834645' +curl -o survivor_afk_fix.zip 'https://web.archive.org/web/20240614062222if_/https://forums.alliedmods.net/attachment.php?attachmentid=189803&d=1623834645' unzipLzmaAndMoveToDir survivor_afk_fix.zip "${LEFT4DEAD2_DIR}/" -# [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019] +# [L4D2] Proper Changelevel [Left 4 Fix] [02/10/2020] # https://forums.alliedmods.net/showthread.php?p=2669850 -curl -o l4d2_levelchanging.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=178784&d=1576565208' +curl -o l4d2_levelchanging.zip 'https://web.archive.org/web/20240610013641if_/https://forums.alliedmods.net/attachment.php?attachmentid=178784&d=1576565208' unzipLzmaAndMoveToDir l4d2_levelchanging.zip "${LEFT4DEAD2_DIR}/" # OTHER FIXES @@ -90,10 +90,7 @@ mv myl4d2addons_original_talker.vpk "${ADDONS_DIR}/" # L4D2-PLUGINS # https://github.com/fbef0102/L4D2-Plugins -git clone 'https://github.com/fbef0102/L4D2-Plugins' -# L4D2 coop save weapon -# https://github.com/fbef0102/L4D2-Plugins/tree/master/l4d2_ty_saveweapons -moveToDir "L4D2-Plugins/l4d2_ty_saveweapons" "${SOURCEMOD_DIR}" +sparseCloneAndMove 'https://github.com/fbef0102/L4D2-Plugins' "l4d2_ty_saveweapons" "${SOURCEMOD_DIR}" # [L4D2]Character_manager (1.4.1 - 22/09/2019 ) # https://forums.alliedmods.net/showthread.php?t=309601 @@ -124,7 +121,6 @@ unzipAndMoveToDir survivor_hunter_pounced_clones_fix.zip "${LEFT4DEAD2_DIR}/" curl -o l4d_hp_laser.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=189361' mv l4d_hp_laser.smx "${SOURCEMOD_PLUGINS_DIR}/" -# Infected Bots Control Improved Version 2.7.3 (2022/8/18 ) +# Infected Bots Control Improved Version 2.7.3 (2024/03/25) # https://forums.alliedmods.net/showthread.php?p=2699220#post2699220 -curl -o l4dinfectedbots.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=196355&d=1660780819' -unzipAndMoveToDir l4dinfectedbots.zip "${SOURCEMOD_DIR}/" "l4dinfectedbots" +sparseCloneAndMove https://github.com/fbef0102/L4D1_2-Plugins.git "l4dinfectedbots" "${SOURCEMOD_DIR}" diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 96bfc60..92900af 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -2,7 +2,12 @@ FROM steamcmd # Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y \ + libstdc++6:i386 \ + libcurl4-gnutls-dev:i386 \ + rsync ENV GAME=l4d2 ENV APP_ID=222860 diff --git a/l4d2/zip-utils.sh b/l4d2/zip-utils.sh index 56b92fa..f5fae9d 100755 --- a/l4d2/zip-utils.sh +++ b/l4d2/zip-utils.sh @@ -18,6 +18,26 @@ function moveToDir { rm -fr "${lSource}" } +function sparseCloneAndMove { + local lWorkingDir=$(pwd) + + local lRepo="$1" + local lBasename=$(basename $1 .git) + local lPaths="$2" + local lDestination="$3" + + mkdir -p "${lDestination}" + local lRealPath=$(realpath "${lDestination}") + + git clone --depth=1 "${lRepo}" + cd "${lBasename}" + git sparse-checkout set "${lPaths}" + for p in "${lPaths[@]}"; do mv "$p" "${lRealPath}"; done + cd "${lWorkingDir}" + + rm -fr "${lBasename}" +} + function unzipAndMoveToDir { local lArchive="$1" local lDestination="$2" From 94fef7d899f5e54ba86dcbac93538e87bcad10ee Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:42:33 +0100 Subject: [PATCH 33/55] conform tf2 to new pattern, add metamod and mvm --- tf2-metamod/Dockerfile | 21 ++ tf2-metamod/README.md | 16 ++ tf2-metamod/download.sh | 13 ++ tf2-metamod/metamod.vdf | 5 + tf2-metamod/plugins.sh | 15 ++ tf2-metamod/start.sh | 5 + tf2-mvm/.dockerignore | 7 + tf2-mvm/.gitignore | 2 + tf2-mvm/Dockerfile | 2 + tf2-mvm/config-templates/mapcycle.template | 6 + tf2-mvm/config-templates/server.template.cfg | 189 ++++++++++++++++++ tf2-mvm/start.sh | 44 +++++ tf2/.cache-info | 1 - tf2/Dockerfile | 29 ++- tf2/config-templates/server.template.cfg | 195 +++++++++++++++++++ tf2/configure.sh | 36 ++++ tf2/launch.sh | 8 + tf2/start.sh | 45 +---- 18 files changed, 585 insertions(+), 54 deletions(-) create mode 100644 tf2-metamod/Dockerfile create mode 100644 tf2-metamod/README.md create mode 100755 tf2-metamod/download.sh create mode 100644 tf2-metamod/metamod.vdf create mode 100755 tf2-metamod/plugins.sh create mode 100755 tf2-metamod/start.sh create mode 100644 tf2-mvm/.dockerignore create mode 100644 tf2-mvm/.gitignore create mode 100644 tf2-mvm/Dockerfile create mode 100644 tf2-mvm/config-templates/mapcycle.template create mode 100644 tf2-mvm/config-templates/server.template.cfg create mode 100755 tf2-mvm/start.sh delete mode 100644 tf2/.cache-info create mode 100644 tf2/config-templates/server.template.cfg create mode 100755 tf2/configure.sh create mode 100755 tf2/launch.sh diff --git a/tf2-metamod/Dockerfile b/tf2-metamod/Dockerfile new file mode 100644 index 0000000..c837c4a --- /dev/null +++ b/tf2-metamod/Dockerfile @@ -0,0 +1,21 @@ +FROM gameservers/teamfortress2 + +USER steamsrv + +RUN /home/steamsrv/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steamsrv/tf2/ +app_update 232250 +quit +ARG CACHE_DATE +RUN /home/steamsrv/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steamsrv/tf2/ +app_update 232250 +quit + +COPY download.sh \ +plugins.sh \ +./ + +RUN ./download.sh + +RUN mkdir tf/ \ + && tar -xf mm*.tar.gz -C tf/ \ + && tar -xf sourcemod*.tar.gz -C tf/ + +COPY metamod.vdf tf/ + +ENTRYPOINT [ "./run_srcds_server" ] diff --git a/tf2-metamod/README.md b/tf2-metamod/README.md new file mode 100644 index 0000000..05c78a1 --- /dev/null +++ b/tf2-metamod/README.md @@ -0,0 +1,16 @@ +# TF2 (with MetaMod) + +This has sourcemod and metamod installed, with the following additional plugins enabled by default: + +* mapchooser +* nominations +* randomcycle +* rockthevote + +The following configuration is available via setting environment variables + +``` +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +``` diff --git a/tf2-metamod/download.sh b/tf2-metamod/download.sh new file mode 100755 index 0000000..5b46b75 --- /dev/null +++ b/tf2-metamod/download.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) + +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") + +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" diff --git a/tf2-metamod/metamod.vdf b/tf2-metamod/metamod.vdf new file mode 100644 index 0000000..bd6008a --- /dev/null +++ b/tf2-metamod/metamod.vdf @@ -0,0 +1,5 @@ +"Plugin" +{ + "file" "../tf/addons/metamod/bin/server" +} + diff --git a/tf2-metamod/plugins.sh b/tf2-metamod/plugins.sh new file mode 100755 index 0000000..5cde971 --- /dev/null +++ b/tf2-metamod/plugins.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [[ -n $PLUGIN_BOT_MANAGER ]]; then + echo "Downloading https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx.." + curl -o botmanager.smx "https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx" + mv botmanager.smx tf/addons/sourcemod/plugins/botmanager.smx + cat </steam/tf2/tf/cfg/autoexec.cfg + +sm_bot_quota 6 +sm_bot_join_after_player 1 +sm_bot_game_logic 0 +sm_bot_supported_map 1 +sm_bot_on_team_only 1 +EOF +fi diff --git a/tf2-metamod/start.sh b/tf2-metamod/start.sh new file mode 100755 index 0000000..62487de --- /dev/null +++ b/tf2-metamod/start.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./configure.sh +./plugins.sh +./run_srcds_server diff --git a/tf2-mvm/.dockerignore b/tf2-mvm/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-mvm/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-mvm/.gitignore b/tf2-mvm/.gitignore new file mode 100644 index 0000000..92db432 --- /dev/null +++ b/tf2-mvm/.gitignore @@ -0,0 +1,2 @@ +mapcycle +server.cfg \ No newline at end of file diff --git a/tf2-mvm/Dockerfile b/tf2-mvm/Dockerfile new file mode 100644 index 0000000..d8295e5 --- /dev/null +++ b/tf2-mvm/Dockerfile @@ -0,0 +1,2 @@ +FROM tf2 + diff --git a/tf2-mvm/config-templates/mapcycle.template b/tf2-mvm/config-templates/mapcycle.template new file mode 100644 index 0000000..eeb81e4 --- /dev/null +++ b/tf2-mvm/config-templates/mapcycle.template @@ -0,0 +1,6 @@ +mvm_decoy +mvm_coaltown +mvm_mannworks +mvm_bigrock +mvm_mannhattan +mvm_rottenburg \ No newline at end of file diff --git a/tf2-mvm/config-templates/server.template.cfg b/tf2-mvm/config-templates/server.template.cfg new file mode 100644 index 0000000..f6e0b49 --- /dev/null +++ b/tf2-mvm/config-templates/server.template.cfg @@ -0,0 +1,189 @@ +// taken from https://steamcommunity.com/discussions/forum/13/612823460277729158/ + +// General MVM Settings // +tf_mm_servermode 1 //puts the server into mvm matchmaking +tf_mm_strict 0 //allows players to join through matchmaking and server browsing +tf_mm_match_size_mvm 6 //minimum players needed in matchmaking before connecting +tf_mvm_min_players_to_start 1 //default 3 +tf_mvm_respec_enabled 1 //allow refunds +tf_mvm_respec_limit 0 //total allowed refunds; 0 - unlimited +tf_mvm_respec_credit_goal 2000 //if respec_limit is not 0, then the total number of credits needed to earn a refund +tf_mvm_skill 3 // 1 - easy; 3 - medium (default); 5 - hard +tf_mvm_disconnect_on_victory 0 //disconnect players on victory +tf_mvm_victory_reset_time 60 //seconds to wait after victory before changing map + +// Hostname for server. +hostname //Change the name + +// Set to lock per-frame time elapse +host_framerate 0 +// Set the pause state of the server +setpause 0 +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 2 +// Is the server pausable +sv_pausable 0 +// Type of server 0=internet 1=lan +sv_lan 0 +// Whether the server enforces file consistency for critical files +sv_consistency 1 +// Collect CPU usage stats +sv_stats 1 +//Tags +//sv_tags +//Server Player Password +// NOTE: if you have a password, your MvM server will not be allowed in Match Making. +//sv_password + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + +// Contact & Region // + +// Contact email for server sysop +//sv_contact @gmail.com +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +//sv_region num + +// Rcon Settings // + +// Password for rcon authentication +rcon_password // Fill in the rcon password +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on +// Log server information to only one file. +sv_log_onefile 1 +// Log server information in the log file. +sv_logfile 1 +// Log server bans in the server logs. +sv_logbans 1 +// Echo log information to the console. +sv_logecho 1 + +// Rate Settings // + +// Frame rate limiter +fps_max 600 +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 +// Minimum updates per second that the server will allow +sv_minupdaterate 10 +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 +// Allow clients to download files +sv_allowdownload 1 +// Maximum allowed file size for uploading in MB +net_maxfilesize 64 + +//VOTING!// + +sv_allow_votes 1 +sv_vote_allow_spectators 0 +sv_vote_failure_timer 120 //(default 300 = 5 minutes) + +// REGULAR GAME VOTES // +//Enable Scramble Vote +sv_vote_issue_scramble_teams_allowed 0 +//Enable Restart Game +sv_vote_issue_restart_game_allowed 1 +//Enable NextLevel Vote +sv_vote_issue_nextlevel_allowed 1 +//Enable Kick vote +sv_vote_issue_kick_allowed 1 +//Kick Duration (0 for no ban time, non-0 for minutes to ban) +sv_vote_kick_ban_duration 10 + +// MVM VOTES // +//Enable Kick vote +sv_vote_issue_kick_allowed_mvm 1 +//Enable changelevel vote +sv_vote_issue_changelevel_allowed_mvm 1 +//Enable restart map vote +sv_vote_issue_restart_game_allowed_mvm 1 +//Enable classlimits vote +sv_vote_issue_classlimits_allowed_mvm 0 +//Enable classlimit max count vote +sv_vote_issue_classlimits_max_mvm 2 //(default 2) +//Enable kick players that havent connected yet but passed certain time threshold +sv_vote_issue_kick_min_connect_time_mvm 0 //(default 0 is enabled) +//Vote timer cooldown +sv_vote_failure_timer_mvm 120 //(default 120 = 2 minutes) +//Allow change difficulty vote +sv_vote_issue_mvm_challenge_allowed 1 + +// Round and Game Times // + +//Wait for Players +mp_waitingforplayers_cancel 1 +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 +// Time after round win until round restarts +mp_bonusroundtime 10 +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 +//Enable sudden death +mp_stalemate_enable 0 +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 +// game time per map in minutes +mp_timelimit 60 +//Max Round Wins +mp_winlimit 0 +//Disable Respawn Times +mp_disable_respawn_times 0 //(default 0; 1 allows near instant respawns) +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 6 +// Maximum number of rounds to play before server changes maps +mp_maxrounds 0 + +// Client CVARS // + +// Restricts spectator modes for dead players +mp_forcecamera 1 +// toggles whether the server allows spectator mode or not +mp_allowspectators 1 +// toggles footstep sounds +mp_footsteps 1 +// toggles game cheats +sv_cheats 0 +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 9 +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 1 +// time (seconds) between decal sprays +decalfrequency 10 +//Overtime Nagging +tf_overtime_nag 1 + +// Communications // + +// enable voice communications +sv_voiceenable 1 +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 +// amount of time players can chat after the game is over +mp_chattime 10 +// enable holiday modes: 0none,1birthday,2halloween,3birthday +//tf_forced_holiday 0 \ No newline at end of file diff --git a/tf2-mvm/start.sh b/tf2-mvm/start.sh new file mode 100755 index 0000000..dac9063 --- /dev/null +++ b/tf2-mvm/start.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +if [ -z $SERVER_TOKEN ] +then + echo "Warning: No server token supplied" >&2 +fi + +if [[ $SV_DOWNLOADURL -eq "auto" ]] +then + INTERFACE=$(ip route | grep default | awk '{print $(NF)}') + IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + SV_DOWNLOADURL="http://$IPADDR/" +fi + +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" + +[[ -z "$MAP" ]] && MAP="mvm_decoy" +MAP="+map $MAP" + +MAXPLAYERS="-maxplayers 32" +MAPCYCLEFILE="+mapcyclefile mvm_mapcycle" +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" +[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" + +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server - Mann Vs Machine" + +cat </steam/tf2/tf/cfg/server.cfg + +hostname "$SV_HOSTNAME" +$RCON_PASSWORD +$SV_PASSWORD +$SV_DOWNLOADURL +EOF + +if [[ -n $SOURCETV_ADDR ]] +then + echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg + exec ./srcds_run -game tf -console -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +else + exec ./srcds_run -game tf +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ +fi +#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini diff --git a/tf2/.cache-info b/tf2/.cache-info deleted file mode 100644 index c040dd0..0000000 --- a/tf2/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/tf2 \ No newline at end of file diff --git a/tf2/Dockerfile b/tf2/Dockerfile index 14d40be..f05ba83 100644 --- a/tf2/Dockerfile +++ b/tf2/Dockerfile @@ -2,24 +2,33 @@ FROM steamcmd # Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y \ + libstdc++6:i386 \ + libcurl3-gnutls-dev:i386 \ + libcurl4-gnutls-dev:i386 \ + libstdc++6:i386 \ + libncurses5:i386 \ + libtinfo5:i386 \ + gdb:i386 ENV GAME=tf2 ENV APP_ID=232250 -RUN mkdir -p /steam/${GAME}/.cache/ \ - && touch /steam/${GAME}/.cache/empty WORKDIR /steam/${GAME}/ -COPY .cache . +RUN chown -R steam /steam/${GAME}/ -RUN chown -R steam /steam/${GAME}/ \ - && mv .cache/* . \ - && rm -fr .cache +USER steam -COPY start.sh . +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -USER steam +COPY configure.sh \ +launch.sh \ +start.sh \ +./ -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit ENTRYPOINT ["./start.sh"] diff --git a/tf2/config-templates/server.template.cfg b/tf2/config-templates/server.template.cfg new file mode 100644 index 0000000..107da5a --- /dev/null +++ b/tf2/config-templates/server.template.cfg @@ -0,0 +1,195 @@ +// General Settings // + +// Hostname for server. +hostname yourserver.com TF2 Server + +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 24 + +// Maximum number of rounds to play before server changes maps +mp_maxrounds 5 + +// Set to lock per-frame time elapse +host_framerate 0 + +// Set the pause state of the server +setpause 0 + +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 0 + +// Is the server pausable +sv_pausable 0 + +// Type of server 0=internet 1=lan +sv_lan 0 + +// Collect CPU usage stats +sv_stats 1 + + + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + + + +// Contact & Region // + +// Contact email for server sysop +sv_contact emailaddy@google.com + +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +sv_region -1 + + + +// Rcon Settings // + +// Password for rcon authentication (Remote CONtrol) +rcon_password yourpw + +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 + +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + + + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on + +// Log server information to only one file. +sv_log_onefile 0 + +// Log server information in the log file. +sv_logfile 1 + +// Log server bans in the server logs. +sv_logbans 1 + +// Echo log information to the console. +sv_logecho 1 + + + +// Rate Settings // + +// Frame rate limiter +fps_max 600 + +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 + +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 + +// Minimum updates per second that the server will allow +sv_minupdaterate 10 + +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + + + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 + +// Allow clients to download files +sv_allowdownload 1 + +// Maximum allowed file size for uploading in MB +net_maxfilesize 15 + + + +// Team Balancing // + +// Enable team balancing +mp_autoteambalance 1 + +// Time after the teams become unbalanced to attempt to switch players. +mp_autoteambalance_delay 60 + +// Time after the teams become unbalanced to print a balance warning +mp_autoteambalance_warning_delay 30 + +// Teams are unbalanced when one team has this many more players than the other team. (0 disables check) +mp_teams_unbalance_limit 1 + + + +// Round and Game Times // + +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 + +// Time after round win until round restarts +mp_bonusroundtime 8 + +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 + +// Enable sudden death +mp_stalemate_enable 1 + +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 + +// Game time per map in minutes +mp_timelimit 35 + + + +// Client CVars // + +// Restricts spectator modes for dead players +mp_forcecamera 0 + +// Toggles whether the server allows spectator mode or not +mp_allowspectators 1 + +// Toggles footstep sounds +mp_footsteps 1 + +// Toggles game cheats +sv_cheats 0 + +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 + +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 15 + +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 2 + +// Time (seconds) between decal sprays +decalfrequency 30 + + + +// Communications // + +// enable voice communications +sv_voiceenable 1 + +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 + +// Amount of time players can chat after the game is over +mp_chattime 10 + +// Enable party mode +tf_birthday 0 \ No newline at end of file diff --git a/tf2/configure.sh b/tf2/configure.sh new file mode 100755 index 0000000..a12ecee --- /dev/null +++ b/tf2/configure.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +if [ -z $SERVER_TOKEN ] +then + echo "Warning: No server token supplied" >&2 +fi + +if [[ $SV_DOWNLOADURL -eq "auto" ]] +then + INTERFACE=$(ip route | grep default | awk '{print $(NF)}') + IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + SV_DOWNLOADURL="http://$IPADDR/" + +fi + +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" + +[[ -z "$MAP" ]] && MAP="cp_badlands" +MAP="+map $MAP" + +[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers $MAXPLAYERS" +[[ -n $MAPCYCLEFILE ]] && MAPCYCLEFILE="+mapcyclefile $MAPCYCLEFILE" +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" +[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" + +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server" + +cat </steam/tf2/tf/cfg/server.cfg + +hostname "$SV_HOSTNAME" +$RCON_PASSWORD +$SV_PASSWORD +$SV_DOWNLOADURL +EOF diff --git a/tf2/launch.sh b/tf2/launch.sh new file mode 100755 index 0000000..6b7f2eb --- /dev/null +++ b/tf2/launch.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ -n $SOURCETV_ADDR ]]; then + echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg + exec ./srcds_run -game tf -debug +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +else + exec ./srcds_run -game tf -debug +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ +fi \ No newline at end of file diff --git a/tf2/start.sh b/tf2/start.sh index aa94da9..eb52bf8 100755 --- a/tf2/start.sh +++ b/tf2/start.sh @@ -1,45 +1,4 @@ #!/bin/bash -if [ -z $SERVER_TOKEN ] -then - echo "Warning: No server token supplied" >&2 -fi - -if [[ $SV_DOWNLOADURL -eq "auto" ]] -then - INTERFACE=$(ip route | grep default | awk '{print $(NF)}') - IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - SV_DOWNLOADURL="http://$IPADDR/" - -fi - -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" - -[[ -z "$MAP" ]] && MAP="cp_badlands" -MAP="+map $MAP" - -[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers $MAXPLAYERS" -[[ -n $MAPCYCLEFILE ]] && MAPCYCLEFILE="+mapcyclefile $MAPCYCLEFILE" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" - -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server" - -cat </steam/tf2/tf/cfg/server.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -$SV_DOWNLOADURL -EOF - -if [[ -n $SOURCETV_ADDR ]] -then - echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg - exec ./srcds_run -game tf -console -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ -else - exec ./srcds_run -game tf +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ -fi -#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini +./configure.sh +./launch.sh From d2016beb2f3df34edc31945b26bd2193d86b5d94 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:43:08 +0100 Subject: [PATCH 34/55] update scpsl-exiled plugins --- scpsl-exiled/Dockerfile | 21 +++++++-------------- scpsl-exiled/download.sh | 11 ++++++++++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/scpsl-exiled/Dockerfile b/scpsl-exiled/Dockerfile index e47811d..3274cb3 100644 --- a/scpsl-exiled/Dockerfile +++ b/scpsl-exiled/Dockerfile @@ -1,24 +1,17 @@ FROM scpsl -ADD download.sh . - -RUN ./download.sh +ENV CONFIG_DIR '/home/steam/.config/' USER root -ENV CONFIG_DIR '/home/steam/.config/' - -RUN tar -xzvf Exiled.tar.gz \ - && mv Assembly-CSharp.dll SCPSL_Data/Managed/ \ - && mv EXILED "${CONFIG_DIR}" \ - && mv *.dll "${CONFIG_DIR}/EXILED/Plugins/" || exit 0 \ - && chown -R steam:steam "${CONFIG_DIR}" \ - && chmod u+rw "${CONFIG_DIR}" +COPY download.sh . +RUN ./download.sh -RUN rm -f *.tar.gz +COPY config.yml "${CONFIG_DIR}/EXILED/Configs/${SERVER_PORT}-config.yml" +RUN chown -R steam:steam "${CONFIG_DIR}" \ + && chmod u+rw "${CONFIG_DIR}" \ + && rm -f *.tar.gz USER steam -ADD config.yml "${CONFIG_DIR}/EXILED/Configs/${SERVER_PORT}-config.yml" - ENTRYPOINT ["./start.sh"] diff --git a/scpsl-exiled/download.sh b/scpsl-exiled/download.sh index dae2bb7..df95538 100755 --- a/scpsl-exiled/download.sh +++ b/scpsl-exiled/download.sh @@ -1,7 +1,13 @@ #!/bin/bash +set -e + # https://github.com/Exiled-Team/EXILED/releases + curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/8.9.11/Exiled.tar.gz' +tar -xzvf Exiled.tar.gz +cp -r EXILED "${CONFIG_DIR}" +rm -fr EXILED # https://github.com/Exiled-Team/Common-Utils curl -LO 'https://github.com/Exiled-Team/Common-Utils/releases/download/7.1.1/Common.Utilities.dll' @@ -13,4 +19,7 @@ curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/8.9.11/Exiled. curl -LO 'https://github.com/1EnesBaturKaza/RPNames/releases/download/v2.2.0/RPNames.dll' # https://github.com/DGvagabond/SCP-008-X - curl -LO 'https://github.com/DGvagabond/SCP-008-X/releases/download/3.1.2/SCP008X.dll' +curl -LO 'https://github.com/DGvagabond/SCP-008-X/releases/download/3.1.2/SCP008X.dll' + +mkdir -p "${CONFIG_DIR}/EXILED/Plugins/" +mv *.dll "${CONFIG_DIR}/EXILED/Plugins/" From beee73c35de072e089d7ffe21811ba454b43b319 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:43:40 +0100 Subject: [PATCH 35/55] conform insurgency to new pattern --- insurgency/Dockerfile | 9 ++++++++- insurgency/default_server_cooperative.cfg | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 insurgency/default_server_cooperative.cfg diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile index 21d6aee..e9c242c 100644 --- a/insurgency/Dockerfile +++ b/insurgency/Dockerfile @@ -20,6 +20,13 @@ RUN chown -R steam /steam/${GAME}/ \ USER steam -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +ADD default_server_cooperative.cfg /steam/insurgency2/insurgency/cfg/default_server_cooperative.cfg + +COPY start.sh \ +./ ENTRYPOINT ["./start.sh"] diff --git a/insurgency/default_server_cooperative.cfg b/insurgency/default_server_cooperative.cfg new file mode 100644 index 0000000..33db0bc --- /dev/null +++ b/insurgency/default_server_cooperative.cfg @@ -0,0 +1,22 @@ +// --------------------------------------------------------------- +// Cooperative Mode Options (server_cooperative.cfg file settings) +// --------------------------------------------------------------- +mapcyclefile "mapcycle_cooperative.txt" // "cooperative" mapcycle - checkpoint only +mp_friendlyfire 1 // friendly fire +mp_tkpunish 0 // How to punish team killing ( 0 = none, 1 = warning, 2 = kill ) +sv_hud_deathmessages 0 // death messages +sv_hud_scoreboard_show_kd 1 // show k:d on scoreboard +sv_hud_targetindicator 1 // show friendly player names when looking at them +mp_timer_pregame 10 // timer for the pre-game (before the game starts, usually after map change or on mp_restartgame 1) +mp_timer_preround 15 // timer for the pre-round (before the round starts, usually after a previous round ends or on mp_restartround 1) +mp_timer_postround 15 // timer for the post-round (after the round starts) +mp_timer_postgame 21 // timer for the post-game (at the end of a game / map rotation) +mp_minteamplayers 1 // min players on each team to start the match +sv_deadvoice 1 // enabling this will allow the dead and living to VOIP each other +sv_deadchat 1 // enabling this will allow the dead and living to chat text each other +sv_deadchat_team 1 // is deadchat limited to just your team? +mp_coop_min_bots 8 // number of bots when there is 1 player on the server +mp_coop_max_bots 26 // number of bots when there are 8 players on the server +mp_coop_min_bot_difficulty 3 // bot difficulty towards the beginning of the mission +mp_coop_max_bot_difficulty 3 // bot difficulty towards the end of the mission +bot_damage 0.6 // the amount of damage bots give off compared to normal players \ No newline at end of file From 1acdcd305097b9c0a817aa3d3f87e88983554bbb Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 5 Aug 2024 22:44:27 +0100 Subject: [PATCH 36/55] conform css to new pattern, metamod and gungame --- css-gungame/Dockerfile | 4 +- css-gungame/download.sh | 8 +- css-gungame/gungame.config.txt | 647 +++++++++++++++++++++++++++++++++ css-metamod/download.sh | 16 +- css/Dockerfile | 16 +- 5 files changed, 668 insertions(+), 23 deletions(-) create mode 100644 css-gungame/gungame.config.txt diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile index c6c6e94..6077089 100644 --- a/css-gungame/Dockerfile +++ b/css-gungame/Dockerfile @@ -5,11 +5,11 @@ USER steam WORKDIR /steam/css/cstrike ADD download.sh . -RUN ./download.sh && \ - unzip sm_gungame.zip +RUN ./download.sh WORKDIR /steam/css ADD start.sh . +ADD gungame.config.txt /steam/css/addons/sourcemod/plugins/cfg/gungame/gungame.config.txt ENTRYPOINT [ "./start.sh" ] diff --git a/css-gungame/download.sh b/css-gungame/download.sh index a60aab1..5717544 100755 --- a/css-gungame/download.sh +++ b/css-gungame/download.sh @@ -1,5 +1,9 @@ #! /bin/bash -# [CS:S/CS:GO] GunGame -# https://forums.alliedmods.net/showthread.php?t=93977 curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' +curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' +unzip sm_gungame.zip +unzip sm_ggdm-1.8.0.zip + +curl -o bot_endround.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=45192' +mv bot_endround.smx addons/sourcemod/plugins/bot_endround.smx diff --git a/css-gungame/gungame.config.txt b/css-gungame/gungame.config.txt new file mode 100644 index 0000000..4fa932b --- /dev/null +++ b/css-gungame/gungame.config.txt @@ -0,0 +1,647 @@ +"GunGame.Config" +{ + "Config" + { + /* ===== [1. GUNGAME MAIN CONFIG] ===== */ + + /* ----- [1.1. main] ----- */ + + /* Enables/Disables GunGame Mod */ + "Enabled" "1" + + /** + * Do not fast switch on level up for this weapons. + * + * Comma-separated list + * of weapon names from gungame.equip.txt. + * + * Options: + * "hegrenade" - Enabled for hegrenade + * "hegrenade,taser" - Enabled for hegrenade and taser + * "taser,hegrenade,molotov,incgrenade" - Default value + * "" - Disabled + */ + "FastSwitchSkipWeapons" "hegrenade" + + /** + * Switch weapon without delays after level up. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnLevelUp" "1" + + /** + * Switch weapon without delays when player changes weapon by himself. + * + * SDK Hooks (sdkhooks) is required to use this option. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnChangeWeapon" "0" + + /** + * Freeze players after win. + * + * Options: + * 1 - Freeze players. + * 0 - Do not freeze players. + */ + "WinnerFreezePlayers" "0" + + /** + * Winner effects. + * + * Options: + * 0 - Freeze players. + * 1 - Make players fly. + */ + "WinnerEffect" "1" + + /** + * Delay before end of multiplayer game after gungame win. + * + * Options: + * 0 - Disabled. + * 1-N - Number of seconds. + */ + "EndGameDelay" "0" + + /** + * Sets how to finish the game after someone has won. + * + * Options: + * 0 - Normal game end with scoreboard, vote next map valve menu and weapon drops. + * 1 - Silent game end. + */ + "EndGameSilent" "0" + + /** + * Multiply sound effects volume. + * + * In CS:GO the volume is too low. + * You can up the volume with this multiplier. + * + * Options: + * 0-1 - Do not multiply + * 2-5 - Multiply by defined number of times + */ + "MultiplySoundVolume" "0" + + /** + * Block weapon switch if killer leveled up with knife + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchIfKnife" "1" + + /** + * Block weapon switch if you get next hegrenade + * after previous hegrenade explode or after getting extra nade. + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchOnNade" "1" + + /** + * Show players level message in hint box instead of chat. + * If enabled then multikill chat messages will be shown + * in hint box too (requres "MultiKillChat" "1"). + */ + "ShowSpawnMsgInHintBox" "0" + + /** + * Show leader level info in hint box + * (requires "ShowSpawnMsgInHintBox" to be "1") + */ + "ShowLeaderInHintBox" "0" + + /* Show leader's weapon name in chat with leading message */ + "ShowLeaderWeapon" "0" + + /** + * Strip dead players weapon + * + * Options: + * 0 - Disabled (default) + * 1 - Enabled for alive and dead players (alive players can not drop guns) + * 2 - Enabled for dead players only (alive players can drop guns) + */ + "StripDeadPlayersWeapon" "2" + + /* Show levels in scoreboard */ + "LevelsInScoreboard" "1" + + /** + * When shows levels in scoreboard it will + * clear deaths (requires "LevelsInScoreboard" "1") + */ + "ScoreboardClearDeaths" "0" + + /* Restore level on player reconnect */ + "RestoreLevelOnReconnect" "1" + + /* Allow level up after round end */ + "AllowLevelUpAfterRoundEnd" "1" + + /* Show multikill hints in chat */ + "MultiKillChat" "0" + + /* Set sv_alltalk 1 after player win */ + "AlltalkOnWin" "1" + + /* Start voting if leader level is less maximum level by this value */ + "VoteLevelLessWeaponCount" "2" + + /* Display a join message, popup giving players instructions on how to play */ + "JoinMessage" "1" + + /** + * Level down playr if they kill themself by WorldSpawn Suicide. + * 0 - Disable + * 1..N - Levels to loose + */ + "WorldspawnSuicide" "1" + + /** + * Level down players if they use the "kill" command + * 0 - Disable + * 1..N - Levels to loose + */ + "CommitSuicide" "1" + + /* How many levels they can gain in 1 round (0 - disabled) */ + "MaxLevelPerRound" "0" + + /* Turbo Mode: give next level weapon on level up */ + "TurboMode" "1" + + /* Knife Elite force them to only have a knife after they level up. + They will get a normal weapon again next round */ + "KnifeElite" "0" + + /** + * How many kills they need to with the weapon to get the next level + * Kills will count across all rounds so that you don't have to get them in one round. + */ + "MinKillsPerLevel" "1" + + /** + * Enabled friendly fire automatically when a player reaches hegrenade level. + * + * When nobody on nade level, than switches friendly fire back. + * This does not affect EnableFriendlyFireLevel and EnableFriendlyFireLevel is not requered to be enabled. + * See also FriendlyFireOnOff. + * + * 0 - Disabled + * 1 - Enable friendly fire on nade level. + */ + "AutoFriendlyFire" "0" + + /** + * FFA DM mode. + * + * If you are using CSS:DM with FFA mode enabled, + * then you should set this variable to "1". + * + * 0 - Disabled + * 1 - Enabled + */ + "FFA" "1" + + /** + * Enable friendly fire on defined level. + * + * This does not affect AutoFriendlyFire and AutoFriendlyFire is not requered to be 1. + * See also FriendlyFireOnOff. + * + * 0 - Disabled. + * 1..N - enable friendly fire on defined level. + */ + "EnableFriendlyFireLevel" "0" + + /** + * What to do with friendly fire when EnableFriendlyFireLevel is not 0 and leader reaches EnableFriendlyFireLevel + * or AutoFriendlyFire is 1 and someone reaches nade level. + * + * 1 - Enable friendy fire + * 0 - Disable friendy fire + */ + "FriendlyFireOnOff" "1" + + /** + * Disable rtv on defined level. 0 - disabled. + */ + "DisableRtvLevel" "0" + + /** + * If this option is enabled, than player can level up by killing with prop_physics. + * For example with fuel barrels etc. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysics" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on grenade level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnGrenade" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnKnife" "0" + + /** + * If this option is enabled, than player can level up by killing with nade at any time. + * For example there are maps having grenades on them leaved by the author. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithMapNades" "0" + + /** + * Use "CanLevelUpWithMapNades" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithNadeOnKnife" "0" + + /** + * Prevent players from using kill command. + */ + "SelfKillProtection" "1" + + /** + * Change game description. + * + * Requires SDK Hooks (sdkhooks). + * + * "{version}" will be changed to plugin version. + * + * Options: + * "" = Option disabled. + */ + "GameDesc" "GunGame:SM {version}" + + /* ----- [1.2. knifepro] ----- */ + + /* Turn Knife Pro allow stealing a player level by killing them with a knife */ + "KnifePro" "1" + + /* Enables Knife Pro when a player is on hegrenade level */ + "KnifeProHE" "0" + + /* The minimum level that a player must be at before another player can knife steal from. Requires KnifePro on */ + "KnifeProMinLevel" "0" + + /* If enabled then knife kill will also affect points */ + "KnifeProRecalcPoints" "0" + + /** + * Maximum level difference between players to allow steal level + * 0 - Disabled + * 1..N - Level difference between killer and victim + */ + "KnifeProMaxDiff" "0" + + /** + * Disable level down on knifepro. + * + * 1 - Level down disabled + * 0 - Level down enabled + */ + "DisableLevelDown" "0" + + /* ----- [1.3. objectives] ----- */ + + /* Give x number of level by completing the bomb planting/defusing objectives. + * Amount giving base on the value setting. + */ + "ObjectiveBonus" "1" + + /* Enables objective bonus on last level */ + "ObjectiveBonusWin" "0" + + /** + * Gives objective bonus on exploding the bomb instead of planting + * 0 - bonus on planting + * 1 - bonus on exploding + */ + "ObjectiveBonusExplode" "0" + + /* Remove objectives from map. 0 = Disabled, 1 = BOMB, 2 = HOSTAGE, 3 = BOTH*/ + "RemoveObjectives" "3" + + /* ----- [1.4. handicap] ----- */ + + /** + * Maximum level that handicap can give. + * 0 - Disable restriction + * 1..N - Max level + */ + "MaxHandicapLevel" "0" + + /* Substract handicap level by this value */ + "HandicapLevelSubstract" "1" + + /** + * Gives joining players the avg/min level of all other players when they join late. + * 0 - Disable + * 1 - Avg level + * 2 - Min level + */ + "HandicapMode" "2" + + /** + * Allow players in the top rank to receive a handicap with the rest of the players. + * + * Handicap must also be turned on above for this to work. + * See also "HandicapTopRank" to set rank limit for tp rank. + * + * 0 - Do not give handicap to the top rank players. + * 1 - Give handicap to all players. + */ + "TopRankHandicap" "1" + + /** + * Gives handicap level automaticaly every defined number of seconds. + * This only works for players that is on very minimum level from + * all the players. + * Handicap must also be turned on for this to work. + */ + "HandicapUpdate" "0" + + /** + * Give handicap not more then given number of times per map. + * 0 - disabled + */ + "HandicapTimesPerMap" "0" + + /** + * Do not give handicap to the top rank players. + * + * See also "TopRankHandicap" to allow all players to receive handicap. + * + * 0 - Give handicap to all players. + * N - Do not give handicap for the first N players. + */ + "HandicapTopRank" "10" + + /** + * Use spectator's levels to calculate handicap level. + * + * 0 - Handicap does not count levels of spectators. + * 1 - Handicap counts levels of spectators. + */ + "HandicapUseSpectators" "0" + + /* ----- [1.5. equip] ----- */ + + /* Auto reload current level weapon on kill */ + "ReloadWeapon" "1" + + /* Give player armor on spawn */ + "ArmorKevlar" "1" + "ArmorHelmet" "1" + + /* Remove additional ammo in bonus weapon on the nade level */ + "RemoveBonusWeaponAmmo" "1" + + /** + * If remove additional ammo in bonus weapon on the nade level is enabled, then give that bullets count. + * + * 0 - default clip size + * 1-N - number of bullets + */ + "BonusWeaponAmmo" "50" + + /** + * This gives the player a weapon with 50 bullets on nade level. + * Example: + * "NadeBonus" "glock" - gives glock + * "NadeBonus" "deagle" - gives deagle + * "NadeBonus" "" - feature disabled + */ + "NadeBonus" "" + + /* Gives a smoke grenade on nade level */ + "NadeSmoke" "0" + + /* Gives a Flash grenade on nade level */ + "NadeFlash" "0" + + /* Gives a smoke grenade on knife level */ + "KnifeSmoke" "0" + + /* Gives a Flash grenade on knife level */ + "KnifeFlash" "0" + + /** + * Gives an extra hegrenade to the player if they get a kill + * + * 0 - Disable + * 1 - Enable + * 2 - Enable only for knife kills + */ + "ExtraNade" "0" + + /* Gives unlimited hegrenades to the player if he is on nage level */ + "UnlimitedNades" "0" + + /** + * Enable UnlimitedNades depending on the number of players in team. + * + * If UnlimitedNades is off and the number of players in one team less or + * equal to UnlimitedNadesMinPlayers then enable UnlimitedNades. + * When it will be more players on both teams, turn UnlimitedNades back to off. + * + * 0 - Disable + * 1 and above - Minimum number of players in each team for UnlimitedNames to be on. + */ + "UnlimitedNadesMinPlayers" "1" + + /** + * Number of nades on the nade level. + * + * This option is disabled + * if less then 2. + */ + "NumberOfNades" "0" + + /* ----- [1.6. multi level] ----- */ + + /* Multi Level Bonus */ + "MultiLevelBonus" "0" + + /* Enable God Mode when multi leveled */ + "MultiLevelBonusGodMode" "1" + + /** + * Custom speed and gravity value multiplier for multi level bonus. + * 0 - Disabled + */ + "MultiLevelBonusGravity" "0.5" + "MultiLevelBonusSpeed" "1.5" + + /* Miltilevel visual effect */ + "MultiLevelEffect" "0" + + /* How much levels is needed to get bonus */ + "MultiLevelAmount" "3" + + /** + * Type of the multi level effect. + * + * 1 - Old effect. + * 2 - New effect (default). + */ + "MultilevelEffectType" "2" + + /* ----- [1.7. warmup] ----- */ + + /* Enables Warmup Round*/ + "WarmupEnabled" "1" + + /* Warmup time length */ + "WarmupTimeLength" "60" + + /** + * Give random weapon on warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + * + * 0 - Disable + * 1 - Random weapon every map + * 2 - Random weapon every round + * 3 - Random weapon every spawn + */ + "WarmupRandomWeaponMode" "0" + + /** + * Gives unlimited hegrenades to the player if warmup is enabled. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupNades" "1" + + /** + * Weapon for warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupWeapon" "" + + /* ===== [2. GUNGAME TK CONFIG] ===== */ + + /** + * How much levels to loose after TK + * 0 - Disable + * 1..N - Levels to loose + */ + "TkLooseLevel" "0" + + /* ===== [3. GUNGAME AFK CONFIG] ===== */ + + /* Enables or disables built in Afk management system */ + "AfkManagement" "1" + + /* Kick player on x number of afk deaths. */ + "AfkDeaths" "5" + + /** + * What action to deal with the player when the maximum is reach? + * 0 = Nothing, 1 = Kick, 2 = Move to spectate, + */ + "AfkAction" "2" + + /* Reload current weapon on afk kill. */ + "AfkReload" "0" + + /* ===== [4. GUNGAME STATS CONFIG] ===== */ + + /** + * Prune player from player win database after numbers of days if they + * havn't been in the server in awhile. This occur during map change. + * It it recommended that you set a value to this setting. Over time as + * the player win database get filled up. It can cause long map changes. + * 0 = off otherwise the value is the number of days. + */ + "Prune" "366" + + /* ===== [5. GUNGAME DISPLAY WINNER CONFIG] ===== */ + + /* Display winner in MOTD window. */ + "DisplayWinnerMotd" "0" + + /* URL to display in MOTD window. */ + "DisplayWinnerUrl" "http://otstrel.ru/gg5_win.php" + + /* Show player rank on win in chat */ + "ShowPlayerRankOnWin" "1" + + /** + * If player wins on bot, then dont add win in stats. + * + * 0 - Add win into stats. + * 1 - Don't add win into stats. + */ + "DontAddWinsOnBot" "0" + + /* ===== [6. GUNGAME BOTS CONFIG] ===== */ + + /** + * Dont use bots levels for handicap calculation. + * Dont give handicap level to bots too. + */ + "HandicapSkipBots" "0" + + /* Can bots win the game otherwise when they reach the last weapon and nothing will happen */ + "BotsCanWinGame" "0" + + /* Allow level up by killing a bot with knife */ + "AllowLevelUpByKnifeBot" "0" + + /* Allow level up by killing a bot with hegrenade */ + "AllowLevelUpByExplodeBot" "0" + + /* Allow level up by killing a bot with knife if there is no other human */ + "AllowLevelUpByKnifeBotIfNoHuman" "1" + + /* Allow level up by killing a bot with hegrenade if there is no other human */ + "AllowLevelUpByExplodeBotIfNoHuman" "1" + } + + "Sounds" + { + "IntroSound" "gungame/gungame2.mp3" + "KnifeLevel" "gungame/knife_level.mp3" + "NadeLevel" "gungame/nade_level.mp3" + "LevelSteal" "gungame/smb3_1-up.mp3" + "LevelUp" "gungame/smb3_powerup.mp3" + "LevelDown" "gungame/smb3_powerdown.mp3" + "Triple" "gungame/smb_star.mp3" + "Autoff" "gungame/smb_warning2.mp3" + "MultiKill" "gungame/multikill.mp3" // (�) VALVE + /* Put each song filename in this list seperated by commas */ + "Winner" "gungame/winner.mp3" // (�) VALVE + "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE + } +} \ No newline at end of file diff --git a/css-metamod/download.sh b/css-metamod/download.sh index 89bcc7e..5b46b75 100755 --- a/css-metamod/download.sh +++ b/css-metamod/download.sh @@ -1,17 +1,13 @@ #!/bin/bash -MMVERSION=$( curl http://www.metamodsource.net/downloads.php | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) - +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) -curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION - -SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") -echo $SMVERSION -echo $SMMAJORVERSION - -SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" -curl -o $SMVERSION $SMURL +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" diff --git a/css/Dockerfile b/css/Dockerfile index f44edcf..64b470f 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -7,19 +7,17 @@ RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6 ENV GAME=css ENV APP_ID=232330 -RUN mkdir -p /steam/${GAME}/.cache/ \ - && touch /steam/${GAME}/.cache/empty WORKDIR /steam/${GAME}/ -COPY .cache . -RUN chown -R steam /steam/${GAME}/ \ - && mv .cache/* . \ - && rm -fr .cache - -COPY start.sh . +RUN chown -R steam /steam/${GAME}/ USER steam -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +COPY start.sh \ +./ ENTRYPOINT ["./start.sh"] From 082f6ade1b2eacc7be816f9c8b81a9db65b4af0e Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 8 Aug 2024 14:01:11 +0100 Subject: [PATCH 37/55] add EulaAccepted config file --- scpsl/start.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scpsl/start.sh b/scpsl/start.sh index 67f7400..66f5664 100755 --- a/scpsl/start.sh +++ b/scpsl/start.sh @@ -9,4 +9,10 @@ mkdir -p "${CONFIG_DIR}" \ && cp -r config_gameplay.txt "${CONFIG_DIR}/config_gameplay.txt" \ && cp -r config_remoteadmin.txt "${CONFIG_DIR}/config_remoteadmin.txt" +DATE_ACCEPTED=$(date -u +"%Y-%m-%dT%H:%M:%S.%NZ") + +cat </home/steam/.config/SCP\ Secret\ Laboratory/config/localadmin_internal_data.json +{"GitHubPersonalAccessToken":null,"EulaAccepted":"${DATE_ACCEPTED}","PluginManagerWarningDismissed":false,"LastPluginAliasesRefresh":null,"PluginVersionCache":{},"PluginAliases":{}} +EOF + ./LocalAdmin ${SERVER_PORT} -d From 34e30490014914141519c4789685fe60644c0e14 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 8 Aug 2024 14:01:33 +0100 Subject: [PATCH 38/55] use DOCKER_BUILDKIT --- docker_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_build.sh b/docker_build.sh index e5e8237..b724e1f 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -17,7 +17,7 @@ do echo "Building ${i}..." cd ${i} echo "Using CACHE_DATE in case updates have been made..." - docker build . --build-arg CACHE_DATE="$(date)" -t ${i} + DOCKER_BUILDKIT=1 docker build . --build-arg CACHE_DATE="$(date)" -t ${i} cd ${BASE_DIR} done From 79fc6ebb23f4943cd66a871dafc621ce195d039c Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 8 Aug 2024 14:03:10 +0100 Subject: [PATCH 39/55] tidy up l4d2 filenames --- l4d2/Dockerfile | 10 ++++------ l4d2/{update_server_details.sh => configure.sh} | 0 l4d2/start.sh | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) rename l4d2/{update_server_details.sh => configure.sh} (100%) diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 92900af..757ee3e 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -22,12 +22,10 @@ RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -COPY update_server_details.sh . -COPY zip-utils.sh . - -COPY server.cfg left4dead2/cfg/server.cfg - -COPY start.sh . +COPY configure.sh ./ \ + zip-utils.sh ./ \ + start.sh ./ \ + server.cfg left4dead2/cfg/ USER root RUN chown steam:steam left4dead2/cfg/server.cfg diff --git a/l4d2/update_server_details.sh b/l4d2/configure.sh similarity index 100% rename from l4d2/update_server_details.sh rename to l4d2/configure.sh diff --git a/l4d2/start.sh b/l4d2/start.sh index 9a42957..ca4bfdb 100755 --- a/l4d2/start.sh +++ b/l4d2/start.sh @@ -9,6 +9,6 @@ set -e [[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" [[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" -./update_server_details.sh +./configure.sh exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 2b936b901392d75d8185be165b62728bdfe6f5cf Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:27:36 +0100 Subject: [PATCH 40/55] base and steamcmd minor refactor --- base/Dockerfile | 1 + docker_build.sh | 2 +- steamcmd/Dockerfile | 22 +++++++++-- steamcmd/zip-utils.sh | 87 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 5 deletions(-) create mode 100755 steamcmd/zip-utils.sh diff --git a/base/Dockerfile b/base/Dockerfile index c309b52..a14880d 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get update \ software-properties-common\ apt-transport-https\ lib32stdc++6\ + rsync \ && apt-get clean RUN echo "$TZ" > /etc/timezone RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime diff --git a/docker_build.sh b/docker_build.sh index b724e1f..4a728e9 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -17,7 +17,7 @@ do echo "Building ${i}..." cd ${i} echo "Using CACHE_DATE in case updates have been made..." - DOCKER_BUILDKIT=1 docker build . --build-arg CACHE_DATE="$(date)" -t ${i} + DOCKER_BUILDKIT=1 docker build --progress=plain --build-arg CACHE_DATE="$(date)" -t ${i} . cd ${BASE_DIR} done diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index 19b3284..2de900e 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -1,14 +1,28 @@ FROM base -RUN useradd -m steam --create-home +# Dear srcds, plz don't crash. We have brought you these offerings. +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y \ + libstdc++6:i386 \ + libcurl3-gnutls-dev:i386 \ + libcurl4-gnutls-dev:i386 \ + libstdc++6:i386 \ + libncurses5:i386 \ + libtinfo5:i386 \ + gdb:i386 -RUN mkdir -p /steam/steamcmd_linux +RUN useradd -m steam --create-home \ + && mkdir -p /steam/steamcmd_linux \ + && mkdir -p /steam/scripts \ + && chown -R steam /steam -RUN chown -R steam /steam -USER steam +COPY zip-utils.sh /steam/scripts/ +USER steam WORKDIR /steam/steamcmd_linux + RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz RUN tar -xf steamcmd_linux.tar.gz diff --git a/steamcmd/zip-utils.sh b/steamcmd/zip-utils.sh new file mode 100755 index 0000000..e323a15 --- /dev/null +++ b/steamcmd/zip-utils.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +export TEMP_DIR="${TEMP_DIR:-/tmp}" +mkdir -p "${TEMP_DIR}" + +function moveToDir { + local lWorkingDir=$(pwd) + + local lSource="$1" + local lDestination="$2" + + echo "rsync from $lSource to $lDestination" + + cd "${lSource}" + rsync -av --stats --progress . "${lDestination}" + cd "${lWorkingDir}" + + rm -fr "${lSource}" +} + +function sparseCloneAndMove { + local lWorkingDir=$(pwd) + + local lRepo="$1" + local lBasename=$(basename $1 .git) + local lPaths="$2" + local lDestination="$3" + + mkdir -p "${lDestination}" + local lRealPath=$(realpath "${lDestination}") + + git clone --depth=1 "${lRepo}" + cd "${lBasename}" + git sparse-checkout set "${lPaths}" + for p in "${lPaths[@]}"; do mv "$p" "${lRealPath}"; done + cd "${lWorkingDir}" + + rm -fr "${lBasename}" +} + +function unzipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + unzip -o "${lArchive}" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + unzip -o "${lArchive}" "${lArchiveDir}/*" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function un7zipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Un7zipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function unzipLzmaAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping LZMA $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} From 6c988cb6c984f8f52f638ef50daba000be62a104 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:38:56 +0100 Subject: [PATCH 41/55] update l4d2 --- l4d2-metamod/download.sh | 2 +- l4d2-multislot/download.sh | 2 +- l4d2/Dockerfile | 8 ---- l4d2/zip-utils.sh | 87 -------------------------------------- 4 files changed, 2 insertions(+), 97 deletions(-) delete mode 100755 l4d2/zip-utils.sh diff --git a/l4d2-metamod/download.sh b/l4d2-metamod/download.sh index e3c9b69..5d9d287 100755 --- a/l4d2-metamod/download.sh +++ b/l4d2-metamod/download.sh @@ -2,7 +2,7 @@ set -e -source zip-utils.sh +source /steam/scripts/zip-utils.sh MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) diff --git a/l4d2-multislot/download.sh b/l4d2-multislot/download.sh index 53e4283..b863258 100755 --- a/l4d2-multislot/download.sh +++ b/l4d2-multislot/download.sh @@ -2,7 +2,7 @@ set -e -source zip-utils.sh +source /steam/scripts/zip-utils.sh # [L4D(2)] MultiSlots Improved Version 4.0 (2021/8/25) # https://forums.alliedmods.net/showpost.php?p=2715546&postcount=249 diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 757ee3e..499dc4e 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -1,13 +1,6 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386 \ - && apt-get update \ - && apt-get install -y \ - libstdc++6:i386 \ - libcurl4-gnutls-dev:i386 \ - rsync ENV GAME=l4d2 ENV APP_ID=222860 @@ -23,7 +16,6 @@ ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit COPY configure.sh ./ \ - zip-utils.sh ./ \ start.sh ./ \ server.cfg left4dead2/cfg/ diff --git a/l4d2/zip-utils.sh b/l4d2/zip-utils.sh deleted file mode 100755 index f5fae9d..0000000 --- a/l4d2/zip-utils.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -export TEMP_DIR="${LEFT4DEAD2_DIR}/tmp" -mkdir -p "${TEMP_DIR}" - -function moveToDir { - local lWorkingDir=$(pwd) - - local lSource="$1" - local lDestination="$2" - - echo "rsync from $lSource to $lDestination" - - cd "${lSource}" - rsync -av --stats --progress . "${lDestination}" - cd "${lWorkingDir}" - - rm -fr "${lSource}" -} - -function sparseCloneAndMove { - local lWorkingDir=$(pwd) - - local lRepo="$1" - local lBasename=$(basename $1 .git) - local lPaths="$2" - local lDestination="$3" - - mkdir -p "${lDestination}" - local lRealPath=$(realpath "${lDestination}") - - git clone --depth=1 "${lRepo}" - cd "${lBasename}" - git sparse-checkout set "${lPaths}" - for p in "${lPaths[@]}"; do mv "$p" "${lRealPath}"; done - cd "${lWorkingDir}" - - rm -fr "${lBasename}" -} - -function unzipAndMoveToDir { - local lArchive="$1" - local lDestination="$2" - local lArchiveDir="$3" - - echo "Unzipping $lArchive/$lArchiveDir to $lDestination" - - if [[ -z "${lArchiveDir}" ]]; then - unzip -o "${lArchive}" -d "${TEMP_DIR}" - moveToDir "${TEMP_DIR}" "${lDestination}" - else - unzip -o "${lArchive}" "${lArchiveDir}/*" -d "${TEMP_DIR}" - moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" - fi -} - -function un7zipAndMoveToDir { - local lArchive="$1" - local lDestination="$2" - local lArchiveDir="$3" - - echo "Un7zipping $lArchive/$lArchiveDir to $lDestination" - - if [[ -z "${lArchiveDir}" ]]; then - 7za x "${lArchive}" -o"${TEMP_DIR}/" - moveToDir "${TEMP_DIR}" "${lDestination}" - else - 7za x "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" - moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" - fi -} - -function unzipLzmaAndMoveToDir { - local lArchive="$1" - local lDestination="$2" - local lArchiveDir="$3" - - echo "Unzipping LZMA $lArchive/$lArchiveDir to $lDestination" - - if [[ -z "${lArchiveDir}" ]]; then - 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}/" - moveToDir "${TEMP_DIR}" "${lDestination}" - else - 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" - moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" - fi -} From 6bdaf3e0eb0953c24f73fe4667463971c128a1ad Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:39:38 +0100 Subject: [PATCH 42/55] update css --- css/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/css/Dockerfile b/css/Dockerfile index 64b470f..2b6632e 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -1,16 +1,12 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. -USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 - ENV GAME=css ENV APP_ID=232330 WORKDIR /steam/${GAME}/ +USER root RUN chown -R steam /steam/${GAME}/ - USER steam RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit From dfabfca9fe16d8417adac87f93cc9e5aabd6a2d6 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:40:48 +0100 Subject: [PATCH 43/55] add cleanup script --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9106ab4..d1517d6 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,13 @@ Make an easy way to import config files in to the servers (eg mounting cfg direc Add more games +### Useful scripts + +- Remove container data +``` +sudo rm -fr /var/lib/docker/containers && sudo mkdir containers && sudo chmod 700 containers +``` + ### LICENSE This project is licensed under GPL 3.0. See LICENSE for more information. From 8df3112494d13cc860ef13b2c340f77dd47239d0 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:41:10 +0100 Subject: [PATCH 44/55] update insurgency --- insurgency/Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile index e9c242c..6191978 100644 --- a/insurgency/Dockerfile +++ b/insurgency/Dockerfile @@ -1,9 +1,5 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. -USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 - USER root ENV GAME=insurgency2 From 0f904661327586cff90d6bd718f2a15105bd6c53 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:41:24 +0100 Subject: [PATCH 45/55] update hl2dm --- hl2dm/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/hl2dm/Dockerfile b/hl2dm/Dockerfile index f48e3d1..d71c7f3 100644 --- a/hl2dm/Dockerfile +++ b/hl2dm/Dockerfile @@ -1,8 +1,6 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 ENV GAME=hl2dm ENV APP_ID=232370 From 962a348e573360dfb0d3c6bc136f51e96b9c6d28 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:51:18 +0100 Subject: [PATCH 46/55] move old build servers into legacy folder --- csgo-metamod/start.sh | 6 ------ csgo/.cache-info | 1 - {7daystodie => legacy/7daystodie}/Dockerfile | 0 {7daystodie => legacy/7daystodie}/README.md | 0 {7daystodie => legacy/7daystodie}/build.sh | 0 {7daystodie => legacy/7daystodie}/mounts | 0 {7daystodie => legacy/7daystodie}/start.sh | 0 {armagetron => legacy/armagetron}/.dockerignore | 0 {armagetron => legacy/armagetron}/Dockerfile | 0 {armagetron => legacy/armagetron}/README.md | 0 {armagetron => legacy/armagetron}/build.sh | 0 {armagetron => legacy/armagetron}/download.sh | 0 {armagetron => legacy/armagetron}/install.sh | 0 {armagetron => legacy/armagetron}/run | 0 {armagetron => legacy/armagetron}/start-ffa.sh | 0 {conan-exile => legacy/conan-exile}/Dockerfile | 0 {conan-exile => legacy/conan-exile}/README.md | 0 {conan-exile => legacy/conan-exile}/build.sh | 0 {conan-exile => legacy/conan-exile}/start-conan.sh | 0 {csgo-comp => legacy/csgo-comp}/Dockerfile | 0 .../first_run/cfg/sourcemod/sm_warmode_off.cfg | 0 .../first_run/cfg/sourcemod/sm_warmode_on.cfg | 0 .../first_run/cfg/sourcemod/sourcemod.cfg | 0 .../PAXAUS2016/second_run/cfg/csgo-server.cfg | 0 .../second_run/cfg/gamemode_competitive_server.cfg | 0 .../csgo-comp}/PAXAUS2016/second_run/cfg/server.cfg | 0 .../second_run/cfg/warmod/on_map_load.cfg | 0 .../second_run/cfg/warmod/ruleset_global.cfg | 0 .../second_run/cfg/warmod/ruleset_overtime.cfg | 0 {csgo-comp => legacy/csgo-comp}/build.sh | 0 {csgo-comp => legacy/csgo-comp}/start-comp.sh | 0 {csgo-ebot => legacy/csgo-ebot}/Dockerfile | 0 {csgo-ebot => legacy/csgo-ebot}/build.sh | 0 {csgo-ebot => legacy/csgo-ebot}/download.sh | 0 {csgo-ebot => legacy/csgo-ebot}/metamod.vdf | 0 {csgo-ebot => legacy/csgo-ebot}/start.sh | 0 {csgo-ebot => legacy/csgo-ebot}/startcontainer.sh | 0 {csgo-gg => legacy/csgo-gg}/Dockerfile | 0 {csgo-gg => legacy/csgo-gg}/gamemode_armsrace.cfg | 0 {csgo-gg => legacy/csgo-gg}/start.sh | 0 {csgo-metamod => legacy/csgo-metamod}/Dockerfile | 2 ++ {csgo-metamod => legacy/csgo-metamod}/README.md | 0 {csgo-metamod => legacy/csgo-metamod}/download.sh | 12 ++++-------- {csgo-metamod => legacy/csgo-metamod}/metamod.vdf | 0 legacy/csgo-metamod/start.sh | 6 ++++++ {csgo-warmod => legacy/csgo-warmod}/Dockerfile | 0 {csgo-warmod => legacy/csgo-warmod}/build.sh | 0 {csgo-warmod => legacy/csgo-warmod}/download.sh | 0 {csgo-warmod => legacy/csgo-warmod}/metamod.vdf | 0 {csgo-warmod => legacy/csgo-warmod}/start-warmod.sh | 0 .../csgo-warmod}/startcontainer.sh | 0 {csgo => legacy/csgo}/.dockerignore | 0 {csgo => legacy/csgo}/.gitignore | 0 {csgo => legacy/csgo}/Dockerfile | 2 -- {csgo => legacy/csgo}/README.md | 0 .../csgo}/config-templates/server.template.cfg | 0 {csgo => legacy/csgo}/configure.sh | 0 {csgo => legacy/csgo}/launch.sh | 3 +-- {csgo => legacy/csgo}/start.sh | 0 .../dont-starve-together}/Dockerfile | 0 .../dont-starve-together}/README.md | 0 .../dont-starve-together}/build.sh | 0 .../dont-starve-together}/start-dontstave.sh | 0 {factorio => legacy/factorio}/Dockerfile | 0 {factorio => legacy/factorio}/build.sh | 0 {factorio => legacy/factorio}/mounts | 0 {factorio => legacy/factorio}/server-settings.json | 0 {factorio => legacy/factorio}/start-factorio.sh | 0 .../Contest-1-Electronic-Circuit/blueprint.dat | Bin .../Contest-1-Electronic-Circuit/control.lua | 0 .../Contest-1-Electronic-Circuit/info.json | 0 .../locale/en/factorio-contest.cfg | 0 .../Contest-1-Electronic-Circuit/preview.png | Bin .../Contest-1-Electronic-Circuit/replay.dat | Bin .../Contest-1-Electronic-Circuit/script-init.dat | Bin .../Contest-1-Electronic-Circuit/script.dat | Bin {graftorio => legacy/graftorio}/Dockerfile | 0 {graftorio => legacy/graftorio}/build.sh | 0 {graftorio => legacy/graftorio}/start-graftorio.sh | 0 {hl2dm => legacy/hl2dm}/.cache-info | 0 {hl2dm => legacy/hl2dm}/.dockerignore | 0 {hl2dm => legacy/hl2dm}/Dockerfile | 0 {hl2dm => legacy/hl2dm}/start.sh | 0 {mordhau => legacy/mordhau}/Dockerfile | 0 {mordhau => legacy/mordhau}/README.md | 0 {mordhau => legacy/mordhau}/build.sh | 0 {mordhau => legacy/mordhau}/start.sh | 0 {mumble => legacy/mumble}/Dockerfile | 0 {mumble => legacy/mumble}/README.md | 0 {mumble => legacy/mumble}/build.sh | 0 {mumble => legacy/mumble}/mounts | 0 {mumble => legacy/mumble}/mumble.ini | 0 {mumble => legacy/mumble}/start-mumble.sh | 0 {quake-live => legacy/quake-live}/Dockerfile | 0 {quake-live => legacy/quake-live}/README.md | 0 {quake-live => legacy/quake-live}/build.sh | 0 {quake-live => legacy/quake-live}/start.sh | 0 {quake3 => legacy/quake3}/Dockerfile | 0 {quake3 => legacy/quake3}/README.md | 0 {quake3 => legacy/quake3}/baseq3/README.md | 0 {quake3 => legacy/quake3}/baseq3/q3config.cfg | 0 {quake3 => legacy/quake3}/build.sh | 0 {quake3 => legacy/quake3}/compmaps.txt | 0 {quake3 => legacy/quake3}/cpma.cfg | 0 {quake3 => legacy/quake3}/start-cpma.sh | 0 {reflex-arena => legacy/reflex-arena}/Dockerfile | 0 {reflex-arena => legacy/reflex-arena}/README.md | 0 {reflex-arena => legacy/reflex-arena}/build.sh | 0 .../reflex-arena}/start-reflex.sh | 0 {rust => legacy/rust}/Dockerfile | 0 {rust => legacy/rust}/README.md | 0 {rust => legacy/rust}/build.sh | 0 {rust => legacy/rust}/start-rust.sh | 0 start_server.sh => legacy/start_server.sh | 0 {trackmania2 => legacy/trackmania2}/Dockerfile | 0 {trackmania2 => legacy/trackmania2}/README.md | 0 {trackmania2 => legacy/trackmania2}/build.sh | 0 .../trackmania2}/start_tm2_canyon.sh | 0 {wine-src => legacy/wine-src}/Dockerfile | 0 {wine-src => legacy/wine-src}/README.md | 0 {wine-src => legacy/wine-src}/build.sh | 0 {wine => legacy/wine}/Dockerfile | 0 {wine => legacy/wine}/README.md | 0 {wine => legacy/wine}/build.sh | 0 {wreckfest => legacy/wreckfest}/Dockerfile | 0 {wreckfest => legacy/wreckfest}/README.md | 0 {wreckfest => legacy/wreckfest}/build.sh | 0 {wreckfest => legacy/wreckfest}/server_config.cfg | 0 {wreckfest => legacy/wreckfest}/start-wreckfest.sh | 0 {zdaemon => legacy/zdaemon}/Dockerfile | 0 {zdaemon => legacy/zdaemon}/README.md | 0 {zdaemon => legacy/zdaemon}/build.sh | 0 {zdaemon => legacy/zdaemon}/download.sh | 0 {zdaemon => legacy/zdaemon}/ffa-template.cfg | 0 {zdaemon => legacy/zdaemon}/start-ffa.sh | 0 zdaemon/wads/.gitsavefolder | 0 136 files changed, 13 insertions(+), 19 deletions(-) delete mode 100755 csgo-metamod/start.sh delete mode 100644 csgo/.cache-info rename {7daystodie => legacy/7daystodie}/Dockerfile (100%) rename {7daystodie => legacy/7daystodie}/README.md (100%) rename {7daystodie => legacy/7daystodie}/build.sh (100%) rename {7daystodie => legacy/7daystodie}/mounts (100%) rename {7daystodie => legacy/7daystodie}/start.sh (100%) rename {armagetron => legacy/armagetron}/.dockerignore (100%) rename {armagetron => legacy/armagetron}/Dockerfile (100%) rename {armagetron => legacy/armagetron}/README.md (100%) rename {armagetron => legacy/armagetron}/build.sh (100%) rename {armagetron => legacy/armagetron}/download.sh (100%) rename {armagetron => legacy/armagetron}/install.sh (100%) rename {armagetron => legacy/armagetron}/run (100%) rename {armagetron => legacy/armagetron}/start-ffa.sh (100%) rename {conan-exile => legacy/conan-exile}/Dockerfile (100%) rename {conan-exile => legacy/conan-exile}/README.md (100%) rename {conan-exile => legacy/conan-exile}/build.sh (100%) rename {conan-exile => legacy/conan-exile}/start-conan.sh (100%) rename {csgo-comp => legacy/csgo-comp}/Dockerfile (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/csgo-server.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/server.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg (100%) rename {csgo-comp => legacy/csgo-comp}/build.sh (100%) rename {csgo-comp => legacy/csgo-comp}/start-comp.sh (100%) rename {csgo-ebot => legacy/csgo-ebot}/Dockerfile (100%) rename {csgo-ebot => legacy/csgo-ebot}/build.sh (100%) rename {csgo-ebot => legacy/csgo-ebot}/download.sh (100%) rename {csgo-ebot => legacy/csgo-ebot}/metamod.vdf (100%) rename {csgo-ebot => legacy/csgo-ebot}/start.sh (100%) rename {csgo-ebot => legacy/csgo-ebot}/startcontainer.sh (100%) rename {csgo-gg => legacy/csgo-gg}/Dockerfile (100%) rename {csgo-gg => legacy/csgo-gg}/gamemode_armsrace.cfg (100%) rename {csgo-gg => legacy/csgo-gg}/start.sh (100%) rename {csgo-metamod => legacy/csgo-metamod}/Dockerfile (98%) rename {csgo-metamod => legacy/csgo-metamod}/README.md (100%) rename {csgo-metamod => legacy/csgo-metamod}/download.sh (61%) rename {csgo-metamod => legacy/csgo-metamod}/metamod.vdf (100%) create mode 100755 legacy/csgo-metamod/start.sh rename {csgo-warmod => legacy/csgo-warmod}/Dockerfile (100%) rename {csgo-warmod => legacy/csgo-warmod}/build.sh (100%) rename {csgo-warmod => legacy/csgo-warmod}/download.sh (100%) rename {csgo-warmod => legacy/csgo-warmod}/metamod.vdf (100%) rename {csgo-warmod => legacy/csgo-warmod}/start-warmod.sh (100%) rename {csgo-warmod => legacy/csgo-warmod}/startcontainer.sh (100%) rename {csgo => legacy/csgo}/.dockerignore (100%) rename {csgo => legacy/csgo}/.gitignore (100%) rename {csgo => legacy/csgo}/Dockerfile (72%) rename {csgo => legacy/csgo}/README.md (100%) rename {csgo => legacy/csgo}/config-templates/server.template.cfg (100%) rename {csgo => legacy/csgo}/configure.sh (100%) rename {csgo => legacy/csgo}/launch.sh (95%) rename {csgo => legacy/csgo}/start.sh (100%) rename {dont-starve-together => legacy/dont-starve-together}/Dockerfile (100%) rename {dont-starve-together => legacy/dont-starve-together}/README.md (100%) rename {dont-starve-together => legacy/dont-starve-together}/build.sh (100%) rename {dont-starve-together => legacy/dont-starve-together}/start-dontstave.sh (100%) rename {factorio => legacy/factorio}/Dockerfile (100%) rename {factorio => legacy/factorio}/build.sh (100%) rename {factorio => legacy/factorio}/mounts (100%) rename {factorio => legacy/factorio}/server-settings.json (100%) rename {factorio => legacy/factorio}/start-factorio.sh (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/blueprint.dat (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/control.lua (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/info.json (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/preview.png (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/replay.dat (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/script-init.dat (100%) rename {graftorio => legacy/graftorio}/Contest-1-Electronic-Circuit/script.dat (100%) rename {graftorio => legacy/graftorio}/Dockerfile (100%) rename {graftorio => legacy/graftorio}/build.sh (100%) rename {graftorio => legacy/graftorio}/start-graftorio.sh (100%) rename {hl2dm => legacy/hl2dm}/.cache-info (100%) rename {hl2dm => legacy/hl2dm}/.dockerignore (100%) rename {hl2dm => legacy/hl2dm}/Dockerfile (100%) rename {hl2dm => legacy/hl2dm}/start.sh (100%) rename {mordhau => legacy/mordhau}/Dockerfile (100%) rename {mordhau => legacy/mordhau}/README.md (100%) rename {mordhau => legacy/mordhau}/build.sh (100%) rename {mordhau => legacy/mordhau}/start.sh (100%) rename {mumble => legacy/mumble}/Dockerfile (100%) rename {mumble => legacy/mumble}/README.md (100%) rename {mumble => legacy/mumble}/build.sh (100%) rename {mumble => legacy/mumble}/mounts (100%) rename {mumble => legacy/mumble}/mumble.ini (100%) rename {mumble => legacy/mumble}/start-mumble.sh (100%) rename {quake-live => legacy/quake-live}/Dockerfile (100%) rename {quake-live => legacy/quake-live}/README.md (100%) rename {quake-live => legacy/quake-live}/build.sh (100%) rename {quake-live => legacy/quake-live}/start.sh (100%) rename {quake3 => legacy/quake3}/Dockerfile (100%) rename {quake3 => legacy/quake3}/README.md (100%) rename {quake3 => legacy/quake3}/baseq3/README.md (100%) rename {quake3 => legacy/quake3}/baseq3/q3config.cfg (100%) rename {quake3 => legacy/quake3}/build.sh (100%) rename {quake3 => legacy/quake3}/compmaps.txt (100%) rename {quake3 => legacy/quake3}/cpma.cfg (100%) rename {quake3 => legacy/quake3}/start-cpma.sh (100%) rename {reflex-arena => legacy/reflex-arena}/Dockerfile (100%) rename {reflex-arena => legacy/reflex-arena}/README.md (100%) rename {reflex-arena => legacy/reflex-arena}/build.sh (100%) rename {reflex-arena => legacy/reflex-arena}/start-reflex.sh (100%) rename {rust => legacy/rust}/Dockerfile (100%) rename {rust => legacy/rust}/README.md (100%) rename {rust => legacy/rust}/build.sh (100%) rename {rust => legacy/rust}/start-rust.sh (100%) rename start_server.sh => legacy/start_server.sh (100%) rename {trackmania2 => legacy/trackmania2}/Dockerfile (100%) rename {trackmania2 => legacy/trackmania2}/README.md (100%) rename {trackmania2 => legacy/trackmania2}/build.sh (100%) rename {trackmania2 => legacy/trackmania2}/start_tm2_canyon.sh (100%) rename {wine-src => legacy/wine-src}/Dockerfile (100%) rename {wine-src => legacy/wine-src}/README.md (100%) rename {wine-src => legacy/wine-src}/build.sh (100%) rename {wine => legacy/wine}/Dockerfile (100%) rename {wine => legacy/wine}/README.md (100%) rename {wine => legacy/wine}/build.sh (100%) rename {wreckfest => legacy/wreckfest}/Dockerfile (100%) rename {wreckfest => legacy/wreckfest}/README.md (100%) rename {wreckfest => legacy/wreckfest}/build.sh (100%) rename {wreckfest => legacy/wreckfest}/server_config.cfg (100%) rename {wreckfest => legacy/wreckfest}/start-wreckfest.sh (100%) rename {zdaemon => legacy/zdaemon}/Dockerfile (100%) rename {zdaemon => legacy/zdaemon}/README.md (100%) rename {zdaemon => legacy/zdaemon}/build.sh (100%) rename {zdaemon => legacy/zdaemon}/download.sh (100%) rename {zdaemon => legacy/zdaemon}/ffa-template.cfg (100%) rename {zdaemon => legacy/zdaemon}/start-ffa.sh (100%) delete mode 100644 zdaemon/wads/.gitsavefolder diff --git a/csgo-metamod/start.sh b/csgo-metamod/start.sh deleted file mode 100755 index 433048c..0000000 --- a/csgo-metamod/start.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -echo "$FULL_ADMINS" "@Full Admins" > css/addons/sourcemod/configs/admins_simple.ini - -./configure.sh -./launch.sh diff --git a/csgo/.cache-info b/csgo/.cache-info deleted file mode 100644 index 09a30e8..0000000 --- a/csgo/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/csgo \ No newline at end of file diff --git a/7daystodie/Dockerfile b/legacy/7daystodie/Dockerfile similarity index 100% rename from 7daystodie/Dockerfile rename to legacy/7daystodie/Dockerfile diff --git a/7daystodie/README.md b/legacy/7daystodie/README.md similarity index 100% rename from 7daystodie/README.md rename to legacy/7daystodie/README.md diff --git a/7daystodie/build.sh b/legacy/7daystodie/build.sh similarity index 100% rename from 7daystodie/build.sh rename to legacy/7daystodie/build.sh diff --git a/7daystodie/mounts b/legacy/7daystodie/mounts similarity index 100% rename from 7daystodie/mounts rename to legacy/7daystodie/mounts diff --git a/7daystodie/start.sh b/legacy/7daystodie/start.sh similarity index 100% rename from 7daystodie/start.sh rename to legacy/7daystodie/start.sh diff --git a/armagetron/.dockerignore b/legacy/armagetron/.dockerignore similarity index 100% rename from armagetron/.dockerignore rename to legacy/armagetron/.dockerignore diff --git a/armagetron/Dockerfile b/legacy/armagetron/Dockerfile similarity index 100% rename from armagetron/Dockerfile rename to legacy/armagetron/Dockerfile diff --git a/armagetron/README.md b/legacy/armagetron/README.md similarity index 100% rename from armagetron/README.md rename to legacy/armagetron/README.md diff --git a/armagetron/build.sh b/legacy/armagetron/build.sh similarity index 100% rename from armagetron/build.sh rename to legacy/armagetron/build.sh diff --git a/armagetron/download.sh b/legacy/armagetron/download.sh similarity index 100% rename from armagetron/download.sh rename to legacy/armagetron/download.sh diff --git a/armagetron/install.sh b/legacy/armagetron/install.sh similarity index 100% rename from armagetron/install.sh rename to legacy/armagetron/install.sh diff --git a/armagetron/run b/legacy/armagetron/run similarity index 100% rename from armagetron/run rename to legacy/armagetron/run diff --git a/armagetron/start-ffa.sh b/legacy/armagetron/start-ffa.sh similarity index 100% rename from armagetron/start-ffa.sh rename to legacy/armagetron/start-ffa.sh diff --git a/conan-exile/Dockerfile b/legacy/conan-exile/Dockerfile similarity index 100% rename from conan-exile/Dockerfile rename to legacy/conan-exile/Dockerfile diff --git a/conan-exile/README.md b/legacy/conan-exile/README.md similarity index 100% rename from conan-exile/README.md rename to legacy/conan-exile/README.md diff --git a/conan-exile/build.sh b/legacy/conan-exile/build.sh similarity index 100% rename from conan-exile/build.sh rename to legacy/conan-exile/build.sh diff --git a/conan-exile/start-conan.sh b/legacy/conan-exile/start-conan.sh similarity index 100% rename from conan-exile/start-conan.sh rename to legacy/conan-exile/start-conan.sh diff --git a/csgo-comp/Dockerfile b/legacy/csgo-comp/Dockerfile similarity index 100% rename from csgo-comp/Dockerfile rename to legacy/csgo-comp/Dockerfile diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg diff --git a/csgo-comp/build.sh b/legacy/csgo-comp/build.sh similarity index 100% rename from csgo-comp/build.sh rename to legacy/csgo-comp/build.sh diff --git a/csgo-comp/start-comp.sh b/legacy/csgo-comp/start-comp.sh similarity index 100% rename from csgo-comp/start-comp.sh rename to legacy/csgo-comp/start-comp.sh diff --git a/csgo-ebot/Dockerfile b/legacy/csgo-ebot/Dockerfile similarity index 100% rename from csgo-ebot/Dockerfile rename to legacy/csgo-ebot/Dockerfile diff --git a/csgo-ebot/build.sh b/legacy/csgo-ebot/build.sh similarity index 100% rename from csgo-ebot/build.sh rename to legacy/csgo-ebot/build.sh diff --git a/csgo-ebot/download.sh b/legacy/csgo-ebot/download.sh similarity index 100% rename from csgo-ebot/download.sh rename to legacy/csgo-ebot/download.sh diff --git a/csgo-ebot/metamod.vdf b/legacy/csgo-ebot/metamod.vdf similarity index 100% rename from csgo-ebot/metamod.vdf rename to legacy/csgo-ebot/metamod.vdf diff --git a/csgo-ebot/start.sh b/legacy/csgo-ebot/start.sh similarity index 100% rename from csgo-ebot/start.sh rename to legacy/csgo-ebot/start.sh diff --git a/csgo-ebot/startcontainer.sh b/legacy/csgo-ebot/startcontainer.sh similarity index 100% rename from csgo-ebot/startcontainer.sh rename to legacy/csgo-ebot/startcontainer.sh diff --git a/csgo-gg/Dockerfile b/legacy/csgo-gg/Dockerfile similarity index 100% rename from csgo-gg/Dockerfile rename to legacy/csgo-gg/Dockerfile diff --git a/csgo-gg/gamemode_armsrace.cfg b/legacy/csgo-gg/gamemode_armsrace.cfg similarity index 100% rename from csgo-gg/gamemode_armsrace.cfg rename to legacy/csgo-gg/gamemode_armsrace.cfg diff --git a/csgo-gg/start.sh b/legacy/csgo-gg/start.sh similarity index 100% rename from csgo-gg/start.sh rename to legacy/csgo-gg/start.sh diff --git a/csgo-metamod/Dockerfile b/legacy/csgo-metamod/Dockerfile similarity index 98% rename from csgo-metamod/Dockerfile rename to legacy/csgo-metamod/Dockerfile index fffc8fb..273e180 100644 --- a/csgo-metamod/Dockerfile +++ b/legacy/csgo-metamod/Dockerfile @@ -1,5 +1,7 @@ FROM csgo +USER root + WORKDIR /steam/csgo/ USER steam ADD download.sh . diff --git a/csgo-metamod/README.md b/legacy/csgo-metamod/README.md similarity index 100% rename from csgo-metamod/README.md rename to legacy/csgo-metamod/README.md diff --git a/csgo-metamod/download.sh b/legacy/csgo-metamod/download.sh similarity index 61% rename from csgo-metamod/download.sh rename to legacy/csgo-metamod/download.sh index 9a37bd3..5b46b75 100755 --- a/csgo-metamod/download.sh +++ b/legacy/csgo-metamod/download.sh @@ -1,17 +1,13 @@ #!/bin/bash MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) - MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) -curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) - SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") -echo $SMVERSION -echo $SMMAJORVERSION - -SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" -curl -o $SMVERSION $SMURL +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" diff --git a/csgo-metamod/metamod.vdf b/legacy/csgo-metamod/metamod.vdf similarity index 100% rename from csgo-metamod/metamod.vdf rename to legacy/csgo-metamod/metamod.vdf diff --git a/legacy/csgo-metamod/start.sh b/legacy/csgo-metamod/start.sh new file mode 100755 index 0000000..d5e008a --- /dev/null +++ b/legacy/csgo-metamod/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "$FULL_ADMINS" "@Full Admins" > csgo/addons/sourcemod/configs/admins_simple.ini + +./configure.sh +./launch.sh diff --git a/csgo-warmod/Dockerfile b/legacy/csgo-warmod/Dockerfile similarity index 100% rename from csgo-warmod/Dockerfile rename to legacy/csgo-warmod/Dockerfile diff --git a/csgo-warmod/build.sh b/legacy/csgo-warmod/build.sh similarity index 100% rename from csgo-warmod/build.sh rename to legacy/csgo-warmod/build.sh diff --git a/csgo-warmod/download.sh b/legacy/csgo-warmod/download.sh similarity index 100% rename from csgo-warmod/download.sh rename to legacy/csgo-warmod/download.sh diff --git a/csgo-warmod/metamod.vdf b/legacy/csgo-warmod/metamod.vdf similarity index 100% rename from csgo-warmod/metamod.vdf rename to legacy/csgo-warmod/metamod.vdf diff --git a/csgo-warmod/start-warmod.sh b/legacy/csgo-warmod/start-warmod.sh similarity index 100% rename from csgo-warmod/start-warmod.sh rename to legacy/csgo-warmod/start-warmod.sh diff --git a/csgo-warmod/startcontainer.sh b/legacy/csgo-warmod/startcontainer.sh similarity index 100% rename from csgo-warmod/startcontainer.sh rename to legacy/csgo-warmod/startcontainer.sh diff --git a/csgo/.dockerignore b/legacy/csgo/.dockerignore similarity index 100% rename from csgo/.dockerignore rename to legacy/csgo/.dockerignore diff --git a/csgo/.gitignore b/legacy/csgo/.gitignore similarity index 100% rename from csgo/.gitignore rename to legacy/csgo/.gitignore diff --git a/csgo/Dockerfile b/legacy/csgo/Dockerfile similarity index 72% rename from csgo/Dockerfile rename to legacy/csgo/Dockerfile index 33f21a8..2bd14f0 100644 --- a/csgo/Dockerfile +++ b/legacy/csgo/Dockerfile @@ -1,8 +1,6 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 ENV GAME=csgo ENV APP_ID=740 diff --git a/csgo/README.md b/legacy/csgo/README.md similarity index 100% rename from csgo/README.md rename to legacy/csgo/README.md diff --git a/csgo/config-templates/server.template.cfg b/legacy/csgo/config-templates/server.template.cfg similarity index 100% rename from csgo/config-templates/server.template.cfg rename to legacy/csgo/config-templates/server.template.cfg diff --git a/csgo/configure.sh b/legacy/csgo/configure.sh similarity index 100% rename from csgo/configure.sh rename to legacy/csgo/configure.sh diff --git a/csgo/launch.sh b/legacy/csgo/launch.sh similarity index 95% rename from csgo/launch.sh rename to legacy/csgo/launch.sh index 158bd03..128d37c 100755 --- a/csgo/launch.sh +++ b/legacy/csgo/launch.sh @@ -1,7 +1,6 @@ #!/bin/bash -set -e -set -u +cd /steam/${GAME}/ if [[ -n $SOURCETV_ADDR ]] then diff --git a/csgo/start.sh b/legacy/csgo/start.sh similarity index 100% rename from csgo/start.sh rename to legacy/csgo/start.sh diff --git a/dont-starve-together/Dockerfile b/legacy/dont-starve-together/Dockerfile similarity index 100% rename from dont-starve-together/Dockerfile rename to legacy/dont-starve-together/Dockerfile diff --git a/dont-starve-together/README.md b/legacy/dont-starve-together/README.md similarity index 100% rename from dont-starve-together/README.md rename to legacy/dont-starve-together/README.md diff --git a/dont-starve-together/build.sh b/legacy/dont-starve-together/build.sh similarity index 100% rename from dont-starve-together/build.sh rename to legacy/dont-starve-together/build.sh diff --git a/dont-starve-together/start-dontstave.sh b/legacy/dont-starve-together/start-dontstave.sh similarity index 100% rename from dont-starve-together/start-dontstave.sh rename to legacy/dont-starve-together/start-dontstave.sh diff --git a/factorio/Dockerfile b/legacy/factorio/Dockerfile similarity index 100% rename from factorio/Dockerfile rename to legacy/factorio/Dockerfile diff --git a/factorio/build.sh b/legacy/factorio/build.sh similarity index 100% rename from factorio/build.sh rename to legacy/factorio/build.sh diff --git a/factorio/mounts b/legacy/factorio/mounts similarity index 100% rename from factorio/mounts rename to legacy/factorio/mounts diff --git a/factorio/server-settings.json b/legacy/factorio/server-settings.json similarity index 100% rename from factorio/server-settings.json rename to legacy/factorio/server-settings.json diff --git a/factorio/start-factorio.sh b/legacy/factorio/start-factorio.sh similarity index 100% rename from factorio/start-factorio.sh rename to legacy/factorio/start-factorio.sh diff --git a/graftorio/Contest-1-Electronic-Circuit/blueprint.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/blueprint.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/blueprint.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/blueprint.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/control.lua b/legacy/graftorio/Contest-1-Electronic-Circuit/control.lua similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/control.lua rename to legacy/graftorio/Contest-1-Electronic-Circuit/control.lua diff --git a/graftorio/Contest-1-Electronic-Circuit/info.json b/legacy/graftorio/Contest-1-Electronic-Circuit/info.json similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/info.json rename to legacy/graftorio/Contest-1-Electronic-Circuit/info.json diff --git a/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg b/legacy/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg rename to legacy/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg diff --git a/graftorio/Contest-1-Electronic-Circuit/preview.png b/legacy/graftorio/Contest-1-Electronic-Circuit/preview.png similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/preview.png rename to legacy/graftorio/Contest-1-Electronic-Circuit/preview.png diff --git a/graftorio/Contest-1-Electronic-Circuit/replay.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/replay.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/replay.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/replay.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/script-init.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/script-init.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/script-init.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/script-init.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/script.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/script.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/script.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/script.dat diff --git a/graftorio/Dockerfile b/legacy/graftorio/Dockerfile similarity index 100% rename from graftorio/Dockerfile rename to legacy/graftorio/Dockerfile diff --git a/graftorio/build.sh b/legacy/graftorio/build.sh similarity index 100% rename from graftorio/build.sh rename to legacy/graftorio/build.sh diff --git a/graftorio/start-graftorio.sh b/legacy/graftorio/start-graftorio.sh similarity index 100% rename from graftorio/start-graftorio.sh rename to legacy/graftorio/start-graftorio.sh diff --git a/hl2dm/.cache-info b/legacy/hl2dm/.cache-info similarity index 100% rename from hl2dm/.cache-info rename to legacy/hl2dm/.cache-info diff --git a/hl2dm/.dockerignore b/legacy/hl2dm/.dockerignore similarity index 100% rename from hl2dm/.dockerignore rename to legacy/hl2dm/.dockerignore diff --git a/hl2dm/Dockerfile b/legacy/hl2dm/Dockerfile similarity index 100% rename from hl2dm/Dockerfile rename to legacy/hl2dm/Dockerfile diff --git a/hl2dm/start.sh b/legacy/hl2dm/start.sh similarity index 100% rename from hl2dm/start.sh rename to legacy/hl2dm/start.sh diff --git a/mordhau/Dockerfile b/legacy/mordhau/Dockerfile similarity index 100% rename from mordhau/Dockerfile rename to legacy/mordhau/Dockerfile diff --git a/mordhau/README.md b/legacy/mordhau/README.md similarity index 100% rename from mordhau/README.md rename to legacy/mordhau/README.md diff --git a/mordhau/build.sh b/legacy/mordhau/build.sh similarity index 100% rename from mordhau/build.sh rename to legacy/mordhau/build.sh diff --git a/mordhau/start.sh b/legacy/mordhau/start.sh similarity index 100% rename from mordhau/start.sh rename to legacy/mordhau/start.sh diff --git a/mumble/Dockerfile b/legacy/mumble/Dockerfile similarity index 100% rename from mumble/Dockerfile rename to legacy/mumble/Dockerfile diff --git a/mumble/README.md b/legacy/mumble/README.md similarity index 100% rename from mumble/README.md rename to legacy/mumble/README.md diff --git a/mumble/build.sh b/legacy/mumble/build.sh similarity index 100% rename from mumble/build.sh rename to legacy/mumble/build.sh diff --git a/mumble/mounts b/legacy/mumble/mounts similarity index 100% rename from mumble/mounts rename to legacy/mumble/mounts diff --git a/mumble/mumble.ini b/legacy/mumble/mumble.ini similarity index 100% rename from mumble/mumble.ini rename to legacy/mumble/mumble.ini diff --git a/mumble/start-mumble.sh b/legacy/mumble/start-mumble.sh similarity index 100% rename from mumble/start-mumble.sh rename to legacy/mumble/start-mumble.sh diff --git a/quake-live/Dockerfile b/legacy/quake-live/Dockerfile similarity index 100% rename from quake-live/Dockerfile rename to legacy/quake-live/Dockerfile diff --git a/quake-live/README.md b/legacy/quake-live/README.md similarity index 100% rename from quake-live/README.md rename to legacy/quake-live/README.md diff --git a/quake-live/build.sh b/legacy/quake-live/build.sh similarity index 100% rename from quake-live/build.sh rename to legacy/quake-live/build.sh diff --git a/quake-live/start.sh b/legacy/quake-live/start.sh similarity index 100% rename from quake-live/start.sh rename to legacy/quake-live/start.sh diff --git a/quake3/Dockerfile b/legacy/quake3/Dockerfile similarity index 100% rename from quake3/Dockerfile rename to legacy/quake3/Dockerfile diff --git a/quake3/README.md b/legacy/quake3/README.md similarity index 100% rename from quake3/README.md rename to legacy/quake3/README.md diff --git a/quake3/baseq3/README.md b/legacy/quake3/baseq3/README.md similarity index 100% rename from quake3/baseq3/README.md rename to legacy/quake3/baseq3/README.md diff --git a/quake3/baseq3/q3config.cfg b/legacy/quake3/baseq3/q3config.cfg similarity index 100% rename from quake3/baseq3/q3config.cfg rename to legacy/quake3/baseq3/q3config.cfg diff --git a/quake3/build.sh b/legacy/quake3/build.sh similarity index 100% rename from quake3/build.sh rename to legacy/quake3/build.sh diff --git a/quake3/compmaps.txt b/legacy/quake3/compmaps.txt similarity index 100% rename from quake3/compmaps.txt rename to legacy/quake3/compmaps.txt diff --git a/quake3/cpma.cfg b/legacy/quake3/cpma.cfg similarity index 100% rename from quake3/cpma.cfg rename to legacy/quake3/cpma.cfg diff --git a/quake3/start-cpma.sh b/legacy/quake3/start-cpma.sh similarity index 100% rename from quake3/start-cpma.sh rename to legacy/quake3/start-cpma.sh diff --git a/reflex-arena/Dockerfile b/legacy/reflex-arena/Dockerfile similarity index 100% rename from reflex-arena/Dockerfile rename to legacy/reflex-arena/Dockerfile diff --git a/reflex-arena/README.md b/legacy/reflex-arena/README.md similarity index 100% rename from reflex-arena/README.md rename to legacy/reflex-arena/README.md diff --git a/reflex-arena/build.sh b/legacy/reflex-arena/build.sh similarity index 100% rename from reflex-arena/build.sh rename to legacy/reflex-arena/build.sh diff --git a/reflex-arena/start-reflex.sh b/legacy/reflex-arena/start-reflex.sh similarity index 100% rename from reflex-arena/start-reflex.sh rename to legacy/reflex-arena/start-reflex.sh diff --git a/rust/Dockerfile b/legacy/rust/Dockerfile similarity index 100% rename from rust/Dockerfile rename to legacy/rust/Dockerfile diff --git a/rust/README.md b/legacy/rust/README.md similarity index 100% rename from rust/README.md rename to legacy/rust/README.md diff --git a/rust/build.sh b/legacy/rust/build.sh similarity index 100% rename from rust/build.sh rename to legacy/rust/build.sh diff --git a/rust/start-rust.sh b/legacy/rust/start-rust.sh similarity index 100% rename from rust/start-rust.sh rename to legacy/rust/start-rust.sh diff --git a/start_server.sh b/legacy/start_server.sh similarity index 100% rename from start_server.sh rename to legacy/start_server.sh diff --git a/trackmania2/Dockerfile b/legacy/trackmania2/Dockerfile similarity index 100% rename from trackmania2/Dockerfile rename to legacy/trackmania2/Dockerfile diff --git a/trackmania2/README.md b/legacy/trackmania2/README.md similarity index 100% rename from trackmania2/README.md rename to legacy/trackmania2/README.md diff --git a/trackmania2/build.sh b/legacy/trackmania2/build.sh similarity index 100% rename from trackmania2/build.sh rename to legacy/trackmania2/build.sh diff --git a/trackmania2/start_tm2_canyon.sh b/legacy/trackmania2/start_tm2_canyon.sh similarity index 100% rename from trackmania2/start_tm2_canyon.sh rename to legacy/trackmania2/start_tm2_canyon.sh diff --git a/wine-src/Dockerfile b/legacy/wine-src/Dockerfile similarity index 100% rename from wine-src/Dockerfile rename to legacy/wine-src/Dockerfile diff --git a/wine-src/README.md b/legacy/wine-src/README.md similarity index 100% rename from wine-src/README.md rename to legacy/wine-src/README.md diff --git a/wine-src/build.sh b/legacy/wine-src/build.sh similarity index 100% rename from wine-src/build.sh rename to legacy/wine-src/build.sh diff --git a/wine/Dockerfile b/legacy/wine/Dockerfile similarity index 100% rename from wine/Dockerfile rename to legacy/wine/Dockerfile diff --git a/wine/README.md b/legacy/wine/README.md similarity index 100% rename from wine/README.md rename to legacy/wine/README.md diff --git a/wine/build.sh b/legacy/wine/build.sh similarity index 100% rename from wine/build.sh rename to legacy/wine/build.sh diff --git a/wreckfest/Dockerfile b/legacy/wreckfest/Dockerfile similarity index 100% rename from wreckfest/Dockerfile rename to legacy/wreckfest/Dockerfile diff --git a/wreckfest/README.md b/legacy/wreckfest/README.md similarity index 100% rename from wreckfest/README.md rename to legacy/wreckfest/README.md diff --git a/wreckfest/build.sh b/legacy/wreckfest/build.sh similarity index 100% rename from wreckfest/build.sh rename to legacy/wreckfest/build.sh diff --git a/wreckfest/server_config.cfg b/legacy/wreckfest/server_config.cfg similarity index 100% rename from wreckfest/server_config.cfg rename to legacy/wreckfest/server_config.cfg diff --git a/wreckfest/start-wreckfest.sh b/legacy/wreckfest/start-wreckfest.sh similarity index 100% rename from wreckfest/start-wreckfest.sh rename to legacy/wreckfest/start-wreckfest.sh diff --git a/zdaemon/Dockerfile b/legacy/zdaemon/Dockerfile similarity index 100% rename from zdaemon/Dockerfile rename to legacy/zdaemon/Dockerfile diff --git a/zdaemon/README.md b/legacy/zdaemon/README.md similarity index 100% rename from zdaemon/README.md rename to legacy/zdaemon/README.md diff --git a/zdaemon/build.sh b/legacy/zdaemon/build.sh similarity index 100% rename from zdaemon/build.sh rename to legacy/zdaemon/build.sh diff --git a/zdaemon/download.sh b/legacy/zdaemon/download.sh similarity index 100% rename from zdaemon/download.sh rename to legacy/zdaemon/download.sh diff --git a/zdaemon/ffa-template.cfg b/legacy/zdaemon/ffa-template.cfg similarity index 100% rename from zdaemon/ffa-template.cfg rename to legacy/zdaemon/ffa-template.cfg diff --git a/zdaemon/start-ffa.sh b/legacy/zdaemon/start-ffa.sh similarity index 100% rename from zdaemon/start-ffa.sh rename to legacy/zdaemon/start-ffa.sh diff --git a/zdaemon/wads/.gitsavefolder b/zdaemon/wads/.gitsavefolder deleted file mode 100644 index e69de29..0000000 From 2fadbb3cbba71c7f067f0c3fb38bb7f2cd698854 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Wed, 14 Aug 2024 13:55:15 +0100 Subject: [PATCH 47/55] add wip to wips --- {tf2-mvm => serioussam3-wip}/.dockerignore | 0 serioussam3-wip/Dockerfile | 12 ++ serioussam3-wip/README.md | 1 + serioussam3-wip/servercfg.cfg | 45 +++++ serioussam3-wip/start.sh | 1 + {tf2 => tf2-melkort-mvm-wip}/.dockerignore | 0 tf2-melkort-mvm-wip/.gitignore | 2 + tf2-melkort-mvm-wip/Dockerfile | 9 + .../config-templates/server.template.cfg | 191 ++++++++++++++++++ .../tf_mvm_missioncycle.template.res | 59 ++++++ tf2-metamod-wip/Dockerfile | 15 ++ {tf2-metamod => tf2-metamod-wip}/README.md | 8 +- {tf2-metamod => tf2-metamod-wip}/download.sh | 15 ++ {tf2-metamod => tf2-metamod-wip}/metamod.vdf | 0 tf2-metamod/Dockerfile | 21 -- tf2-metamod/plugins.sh | 15 -- tf2-metamod/start.sh | 5 - tf2-mvm-wip/.dockerignore | 7 + {tf2-mvm => tf2-mvm-wip}/.gitignore | 0 tf2-mvm-wip/Dockerfile | 4 + .../config-templates/mapcycle.template | 0 .../config-templates/server.template.cfg | 0 tf2-mvm/Dockerfile | 2 - tf2-mvm/start.sh | 44 ---- .../Dockerfile | 0 .../build.sh | 0 {tf2-prophunt => tf2-prophunt-wip}/Dockerfile | 0 {tf2-prophunt => tf2-prophunt-wip}/build.sh | 0 .../download.sh | 0 .../metamod.vdf | 0 .../ph-maplist.txt | 0 .../start-tf2-prophunt.sh | 0 .../web.Dockerfile | 0 tf2-wip/.dockerignore | 7 + tf2-wip/.gitignore | 3 + {tf2 => tf2-wip}/Dockerfile | 32 +-- {tf2 => tf2-wip}/README.md | 0 .../config-templates/mapcycle.template.txt | 44 ++++ tf2-wip/config-templates/motd.template.txt | 1 + .../config-templates/server.template.cfg | 2 + tf2-wip/configure.sh | 38 ++++ tf2-wip/start.sh | 4 + tf2-wip/tv.sh | 7 + tf2/configure.sh | 36 ---- tf2/launch.sh | 8 - tf2/start.sh | 4 - 46 files changed, 485 insertions(+), 157 deletions(-) rename {tf2-mvm => serioussam3-wip}/.dockerignore (100%) create mode 100644 serioussam3-wip/Dockerfile create mode 100644 serioussam3-wip/README.md create mode 100644 serioussam3-wip/servercfg.cfg create mode 100755 serioussam3-wip/start.sh rename {tf2 => tf2-melkort-mvm-wip}/.dockerignore (100%) create mode 100644 tf2-melkort-mvm-wip/.gitignore create mode 100644 tf2-melkort-mvm-wip/Dockerfile create mode 100644 tf2-melkort-mvm-wip/config-templates/server.template.cfg create mode 100644 tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res create mode 100644 tf2-metamod-wip/Dockerfile rename {tf2-metamod => tf2-metamod-wip}/README.md (53%) rename {tf2-metamod => tf2-metamod-wip}/download.sh (57%) rename {tf2-metamod => tf2-metamod-wip}/metamod.vdf (100%) delete mode 100644 tf2-metamod/Dockerfile delete mode 100755 tf2-metamod/plugins.sh delete mode 100755 tf2-metamod/start.sh create mode 100644 tf2-mvm-wip/.dockerignore rename {tf2-mvm => tf2-mvm-wip}/.gitignore (100%) create mode 100644 tf2-mvm-wip/Dockerfile rename {tf2-mvm => tf2-mvm-wip}/config-templates/mapcycle.template (100%) rename {tf2-mvm => tf2-mvm-wip}/config-templates/server.template.cfg (100%) delete mode 100644 tf2-mvm/Dockerfile delete mode 100755 tf2-mvm/start.sh rename {tf2-prophunt-web => tf2-prophunt-web-wip}/Dockerfile (100%) rename {tf2-prophunt-web => tf2-prophunt-web-wip}/build.sh (100%) rename {tf2-prophunt => tf2-prophunt-wip}/Dockerfile (100%) rename {tf2-prophunt => tf2-prophunt-wip}/build.sh (100%) rename {tf2-prophunt => tf2-prophunt-wip}/download.sh (100%) rename {tf2-prophunt => tf2-prophunt-wip}/metamod.vdf (100%) rename {tf2-prophunt => tf2-prophunt-wip}/ph-maplist.txt (100%) rename {tf2-prophunt => tf2-prophunt-wip}/start-tf2-prophunt.sh (100%) rename {tf2-prophunt => tf2-prophunt-wip}/web.Dockerfile (100%) create mode 100644 tf2-wip/.dockerignore create mode 100644 tf2-wip/.gitignore rename {tf2 => tf2-wip}/Dockerfile (55%) rename {tf2 => tf2-wip}/README.md (100%) create mode 100644 tf2-wip/config-templates/mapcycle.template.txt create mode 100644 tf2-wip/config-templates/motd.template.txt rename {tf2 => tf2-wip}/config-templates/server.template.cfg (98%) create mode 100755 tf2-wip/configure.sh create mode 100755 tf2-wip/start.sh create mode 100644 tf2-wip/tv.sh delete mode 100755 tf2/configure.sh delete mode 100755 tf2/launch.sh delete mode 100755 tf2/start.sh diff --git a/tf2-mvm/.dockerignore b/serioussam3-wip/.dockerignore similarity index 100% rename from tf2-mvm/.dockerignore rename to serioussam3-wip/.dockerignore diff --git a/serioussam3-wip/Dockerfile b/serioussam3-wip/Dockerfile new file mode 100644 index 0000000..ba53deb --- /dev/null +++ b/serioussam3-wip/Dockerfile @@ -0,0 +1,12 @@ +FROM steamcmd + +USER root + +ENV GAME=ss3 +ENV APP_ID=41080 + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit + +ENTRYPOINT ["./start.sh"] diff --git a/serioussam3-wip/README.md b/serioussam3-wip/README.md new file mode 100644 index 0000000..c85f88f --- /dev/null +++ b/serioussam3-wip/README.md @@ -0,0 +1 @@ +# Serious Sam 3 \ No newline at end of file diff --git a/serioussam3-wip/servercfg.cfg b/serioussam3-wip/servercfg.cfg new file mode 100644 index 0000000..a727891 --- /dev/null +++ b/serioussam3-wip/servercfg.cfg @@ -0,0 +1,45 @@ +-- General +rcts_strWelcomeNote = "Server RCON MOTD"; +rcts_strAdminPassword = "changeme"; +prj_strLogFile = ""; +net_strLocalHost = ""; +gam_idGameMode = "Cooperative"; +ser_iMaxClientBPS = 11000; +prj_iDedicatedFPS = 100; +gam_ctMaxPlayers = 20; +prj_uwPort = 27015; +prj_strMultiplayerSessionName = "NoxLAN - Serious Sam 3 BFE Server"; + +-- Options +gam_bAllowJoinInProgress = 1; +gam_bAllowPowerupItems = 1; +gam_bAllowArmorItems = 1; +gam_bWeaponsStay = 1; +gam_bAmmoStays = 1; +gam_bArmorStays = 1; +gam_bHealthStays = 1; +gam_bAllowHealthItems = 1; +gam_bInfiniteAmmo = 0; + +-- Levels +local mapList = ""; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\01_CairoSquare\01_CairoSquare.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\02_CairoMuseum\02_CairoMuseum.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\03_IbnTulun\03_IbnTulun.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\04_IbnTulun\04_Medina.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\05_CairoTown\05_CairoTown.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\06_Pyramids\06_Pyramids.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\07_Karnak1\07_Karnak1.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\08_Karnak2\08_Karnak2.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\09_Luxor\09_Luxor.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\10_LostNubianTemples\10_LostNubianTemples.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\11_Ramesseum\11_Ramesseum.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\12_HatshepsutTemple\12_HatshepsutTemple.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\01_Philae\01_Philae.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\02_AbuSimbel\02_AbuSimbel.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\03_TempleOfSethirkopshef\03_TempleOfSethirkopshef.wld;"; +prj_StrMapList = mapList; + +-- Scripts + +-- Custom diff --git a/serioussam3-wip/start.sh b/serioussam3-wip/start.sh new file mode 100755 index 0000000..a9bf588 --- /dev/null +++ b/serioussam3-wip/start.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/tf2/.dockerignore b/tf2-melkort-mvm-wip/.dockerignore similarity index 100% rename from tf2/.dockerignore rename to tf2-melkort-mvm-wip/.dockerignore diff --git a/tf2-melkort-mvm-wip/.gitignore b/tf2-melkort-mvm-wip/.gitignore new file mode 100644 index 0000000..7323e9a --- /dev/null +++ b/tf2-melkort-mvm-wip/.gitignore @@ -0,0 +1,2 @@ +tf_mvm_missioncycle.res +server.cfg \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/Dockerfile b/tf2-melkort-mvm-wip/Dockerfile new file mode 100644 index 0000000..1c4ee97 --- /dev/null +++ b/tf2-melkort-mvm-wip/Dockerfile @@ -0,0 +1,9 @@ +FROM ghcr.io/melkortf/tf2-sourcemod + +COPY tf_mvm_missioncycle.res /home/tf2/server/tf/ +COPY server.cfg /home/tf2/server/tf/cfg/ + +ENV MAP=mvm_coaltown + +ENTRYPOINT ["./entrypoint.sh"] +CMD ["+sv_pure", "1", "+map", "mvm_coaltown", "+maxplayers", "40"]tf \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/config-templates/server.template.cfg b/tf2-melkort-mvm-wip/config-templates/server.template.cfg new file mode 100644 index 0000000..c95b4c2 --- /dev/null +++ b/tf2-melkort-mvm-wip/config-templates/server.template.cfg @@ -0,0 +1,191 @@ +// taken from https://steamcommunity.com/discussions/forum/13/612823460277729158/ + +// General MVM Settings // +tf_mm_servermode 1 //puts the server into mvm matchmaking +tf_mm_strict 0 //allows players to join through matchmaking and server browsing +tf_mm_match_size_mvm 6 //minimum players needed in matchmaking before connecting +tf_mvm_min_players_to_start 1 //default 3 +tf_mvm_respec_enabled 1 //allow refunds +tf_mvm_respec_limit 0 //total allowed refunds; 0 - unlimited +tf_mvm_respec_credit_goal 2000 //if respec_limit is not 0, then the total number of credits needed to earn a refund +tf_mvm_skill 3 // 1 - easy; 3 - medium (default); 5 - hard +tf_mvm_disconnect_on_victory 0 //disconnect players on victory +tf_mvm_victory_reset_time 60 //seconds to wait after victory before changing map +tf_mvm_defenders_team_size 16 +tf_mvm_max_connected_players 16 + +// Hostname for server. +hostname //Change the name + +// Set to lock per-frame time elapse +host_framerate 0 +// Set the pause state of the server +setpause 0 +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 2 +// Is the server pausable +sv_pausable 0 +// Type of server 0=internet 1=lan +sv_lan 0 +// Whether the server enforces file consistency for critical files +sv_consistency 1 +// Collect CPU usage stats +sv_stats 1 +//Tags +//sv_tags +//Server Player Password +// NOTE: if you have a password, your MvM server will not be allowed in Match Making. +//sv_password + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + +// Contact & Region // + +// Contact email for server sysop +//sv_contact @gmail.com +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +//sv_region num + +// Rcon Settings // + +// Password for rcon authentication +rcon_password // Fill in the rcon password +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on +// Log server information to only one file. +sv_log_onefile 1 +// Log server information in the log file. +sv_logfile 1 +// Log server bans in the server logs. +sv_logbans 1 +// Echo log information to the console. +sv_logecho 1 + +// Rate Settings // + +// Frame rate limiter +fps_max 600 +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 +// Minimum updates per second that the server will allow +sv_minupdaterate 10 +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 +// Allow clients to download files +sv_allowdownload 1 +// Maximum allowed file size for uploading in MB +net_maxfilesize 64 + +//VOTING!// + +sv_allow_votes 1 +sv_vote_allow_spectators 0 +sv_vote_failure_timer 120 //(default 300 = 5 minutes) + +// REGULAR GAME VOTES // +//Enable Scramble Vote +sv_vote_issue_scramble_teams_allowed 0 +//Enable Restart Game +sv_vote_issue_restart_game_allowed 1 +//Enable NextLevel Vote +sv_vote_issue_nextlevel_allowed 1 +//Enable Kick vote +sv_vote_issue_kick_allowed 1 +//Kick Duration (0 for no ban time, non-0 for minutes to ban) +sv_vote_kick_ban_duration 10 + +// MVM VOTES // +//Enable Kick vote +sv_vote_issue_kick_allowed_mvm 1 +//Enable changelevel vote +sv_vote_issue_changelevel_allowed_mvm 1 +//Enable restart map vote +sv_vote_issue_restart_game_allowed_mvm 1 +//Enable classlimits vote +sv_vote_issue_classlimits_allowed_mvm 0 +//Enable classlimit max count vote +sv_vote_issue_classlimits_max_mvm 2 //(default 2) +//Enable kick players that havent connected yet but passed certain time threshold +sv_vote_issue_kick_min_connect_time_mvm 0 //(default 0 is enabled) +//Vote timer cooldown +sv_vote_failure_timer_mvm 120 //(default 120 = 2 minutes) +//Allow change difficulty vote +sv_vote_issue_mvm_challenge_allowed 1 + +// Round and Game Times // + +//Wait for Players +mp_waitingforplayers_cancel 1 +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 +// Time after round win until round restarts +mp_bonusroundtime 10 +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 +//Enable sudden death +mp_stalemate_enable 0 +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 +// game time per map in minutes +mp_timelimit 60 +//Max Round Wins +mp_winlimit 0 +//Disable Respawn Times +mp_disable_respawn_times 0 //(default 0; 1 allows near instant respawns) +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 6 +// Maximum number of rounds to play before server changes maps +mp_maxrounds 0 + +// Client CVARS // + +// Restricts spectator modes for dead players +mp_forcecamera 1 +// toggles whether the server allows spectator mode or not +mp_allowspectators 1 +// toggles footstep sounds +mp_footsteps 1 +// toggles game cheats +sv_cheats 0 +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 9 +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 1 +// time (seconds) between decal sprays +decalfrequency 10 +//Overtime Nagging +tf_overtime_nag 1 + +// Communications // + +// enable voice communications +sv_voiceenable 1 +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 +// amount of time players can chat after the game is over +mp_chattime 10 +// enable holiday modes: 0none,1birthday,2halloween,3birthday +//tf_forced_holiday 0 \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res b/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res new file mode 100644 index 0000000..99979b4 --- /dev/null +++ b/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res @@ -0,0 +1,59 @@ +"tf_mvm_missioncycle.res" +{ + "categories" "2" + "1" + { + "count" "3" + + "1" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy" + } + "2" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown" + } + "3" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks" + } + } + "2" + { + "count" "6" + + "1" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy_advanced" + } + "2" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown_advanced" + } + "3" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks_advanced" + } + "4" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy_advanced2" + } + "5" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown_advanced2" + } + "6" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks_ironman" + } + } +} \ No newline at end of file diff --git a/tf2-metamod-wip/Dockerfile b/tf2-metamod-wip/Dockerfile new file mode 100644 index 0000000..b4a0ac6 --- /dev/null +++ b/tf2-metamod-wip/Dockerfile @@ -0,0 +1,15 @@ +FROM tf2 + +WORKDIR /steam/tf2/ +USER steam + +COPY download.sh ./ + +RUN ./download.sh + +RUN tar -xf mm*.tar.gz -C tf/ +RUN tar -xf sourcemod*.tar.gz -C tf/ + +COPY metamod.vdf tf/ + +ENTRYPOINT [ "./start.sh" ] diff --git a/tf2-metamod/README.md b/tf2-metamod-wip/README.md similarity index 53% rename from tf2-metamod/README.md rename to tf2-metamod-wip/README.md index 05c78a1..a2cec52 100644 --- a/tf2-metamod/README.md +++ b/tf2-metamod-wip/README.md @@ -7,10 +7,6 @@ This has sourcemod and metamod installed, with the following additional plugins * randomcycle * rockthevote -The following configuration is available via setting environment variables +Optional plugins -``` -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -``` +- (Bot Manager)[https://forums.alliedmods.net/showthread.php?p=1983621] - Set PLUGIN_BOT_MANAGER env to non-empty value \ No newline at end of file diff --git a/tf2-metamod/download.sh b/tf2-metamod-wip/download.sh similarity index 57% rename from tf2-metamod/download.sh rename to tf2-metamod-wip/download.sh index 5b46b75..26605ac 100755 --- a/tf2-metamod/download.sh +++ b/tf2-metamod-wip/download.sh @@ -11,3 +11,18 @@ SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0- echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" + +if [[ -n $PLUGIN_BOT_MANAGER ]]; then + # https://forums.alliedmods.net/showthread.php?p=1983621 + echo "Downloading https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx.." + curl -o botmanager.smx "https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx" + mv botmanager.smx tf/addons/sourcemod/plugins/botmanager.smx + cat </steam/tf2/tf/cfg/autoexec.cfg + +sm_bot_quota 6 +sm_bot_join_after_player 1 +sm_bot_game_logic 0 +sm_bot_supported_map 1 +sm_bot_on_team_only 1 +EOF +fi diff --git a/tf2-metamod/metamod.vdf b/tf2-metamod-wip/metamod.vdf similarity index 100% rename from tf2-metamod/metamod.vdf rename to tf2-metamod-wip/metamod.vdf diff --git a/tf2-metamod/Dockerfile b/tf2-metamod/Dockerfile deleted file mode 100644 index c837c4a..0000000 --- a/tf2-metamod/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM gameservers/teamfortress2 - -USER steamsrv - -RUN /home/steamsrv/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steamsrv/tf2/ +app_update 232250 +quit -ARG CACHE_DATE -RUN /home/steamsrv/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steamsrv/tf2/ +app_update 232250 +quit - -COPY download.sh \ -plugins.sh \ -./ - -RUN ./download.sh - -RUN mkdir tf/ \ - && tar -xf mm*.tar.gz -C tf/ \ - && tar -xf sourcemod*.tar.gz -C tf/ - -COPY metamod.vdf tf/ - -ENTRYPOINT [ "./run_srcds_server" ] diff --git a/tf2-metamod/plugins.sh b/tf2-metamod/plugins.sh deleted file mode 100755 index 5cde971..0000000 --- a/tf2-metamod/plugins.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [[ -n $PLUGIN_BOT_MANAGER ]]; then - echo "Downloading https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx.." - curl -o botmanager.smx "https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx" - mv botmanager.smx tf/addons/sourcemod/plugins/botmanager.smx - cat </steam/tf2/tf/cfg/autoexec.cfg - -sm_bot_quota 6 -sm_bot_join_after_player 1 -sm_bot_game_logic 0 -sm_bot_supported_map 1 -sm_bot_on_team_only 1 -EOF -fi diff --git a/tf2-metamod/start.sh b/tf2-metamod/start.sh deleted file mode 100755 index 62487de..0000000 --- a/tf2-metamod/start.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -./configure.sh -./plugins.sh -./run_srcds_server diff --git a/tf2-mvm-wip/.dockerignore b/tf2-mvm-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-mvm-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-mvm/.gitignore b/tf2-mvm-wip/.gitignore similarity index 100% rename from tf2-mvm/.gitignore rename to tf2-mvm-wip/.gitignore diff --git a/tf2-mvm-wip/Dockerfile b/tf2-mvm-wip/Dockerfile new file mode 100644 index 0000000..5245b4f --- /dev/null +++ b/tf2-mvm-wip/Dockerfile @@ -0,0 +1,4 @@ +FROM tf2-metamod + +COPY mapcycle ./tf/ +COPY server.cfg ./tf/cfg/ diff --git a/tf2-mvm/config-templates/mapcycle.template b/tf2-mvm-wip/config-templates/mapcycle.template similarity index 100% rename from tf2-mvm/config-templates/mapcycle.template rename to tf2-mvm-wip/config-templates/mapcycle.template diff --git a/tf2-mvm/config-templates/server.template.cfg b/tf2-mvm-wip/config-templates/server.template.cfg similarity index 100% rename from tf2-mvm/config-templates/server.template.cfg rename to tf2-mvm-wip/config-templates/server.template.cfg diff --git a/tf2-mvm/Dockerfile b/tf2-mvm/Dockerfile deleted file mode 100644 index d8295e5..0000000 --- a/tf2-mvm/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM tf2 - diff --git a/tf2-mvm/start.sh b/tf2-mvm/start.sh deleted file mode 100755 index dac9063..0000000 --- a/tf2-mvm/start.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -if [ -z $SERVER_TOKEN ] -then - echo "Warning: No server token supplied" >&2 -fi - -if [[ $SV_DOWNLOADURL -eq "auto" ]] -then - INTERFACE=$(ip route | grep default | awk '{print $(NF)}') - IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - SV_DOWNLOADURL="http://$IPADDR/" -fi - -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" - -[[ -z "$MAP" ]] && MAP="mvm_decoy" -MAP="+map $MAP" - -MAXPLAYERS="-maxplayers 32" -MAPCYCLEFILE="+mapcyclefile mvm_mapcycle" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" - -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server - Mann Vs Machine" - -cat </steam/tf2/tf/cfg/server.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -$SV_DOWNLOADURL -EOF - -if [[ -n $SOURCETV_ADDR ]] -then - echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg - exec ./srcds_run -game tf -console -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ -else - exec ./srcds_run -game tf +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ -fi -#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini diff --git a/tf2-prophunt-web/Dockerfile b/tf2-prophunt-web-wip/Dockerfile similarity index 100% rename from tf2-prophunt-web/Dockerfile rename to tf2-prophunt-web-wip/Dockerfile diff --git a/tf2-prophunt-web/build.sh b/tf2-prophunt-web-wip/build.sh similarity index 100% rename from tf2-prophunt-web/build.sh rename to tf2-prophunt-web-wip/build.sh diff --git a/tf2-prophunt/Dockerfile b/tf2-prophunt-wip/Dockerfile similarity index 100% rename from tf2-prophunt/Dockerfile rename to tf2-prophunt-wip/Dockerfile diff --git a/tf2-prophunt/build.sh b/tf2-prophunt-wip/build.sh similarity index 100% rename from tf2-prophunt/build.sh rename to tf2-prophunt-wip/build.sh diff --git a/tf2-prophunt/download.sh b/tf2-prophunt-wip/download.sh similarity index 100% rename from tf2-prophunt/download.sh rename to tf2-prophunt-wip/download.sh diff --git a/tf2-prophunt/metamod.vdf b/tf2-prophunt-wip/metamod.vdf similarity index 100% rename from tf2-prophunt/metamod.vdf rename to tf2-prophunt-wip/metamod.vdf diff --git a/tf2-prophunt/ph-maplist.txt b/tf2-prophunt-wip/ph-maplist.txt similarity index 100% rename from tf2-prophunt/ph-maplist.txt rename to tf2-prophunt-wip/ph-maplist.txt diff --git a/tf2-prophunt/start-tf2-prophunt.sh b/tf2-prophunt-wip/start-tf2-prophunt.sh similarity index 100% rename from tf2-prophunt/start-tf2-prophunt.sh rename to tf2-prophunt-wip/start-tf2-prophunt.sh diff --git a/tf2-prophunt/web.Dockerfile b/tf2-prophunt-wip/web.Dockerfile similarity index 100% rename from tf2-prophunt/web.Dockerfile rename to tf2-prophunt-wip/web.Dockerfile diff --git a/tf2-wip/.dockerignore b/tf2-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-wip/.gitignore b/tf2-wip/.gitignore new file mode 100644 index 0000000..415839d --- /dev/null +++ b/tf2-wip/.gitignore @@ -0,0 +1,3 @@ +server.cfg +mapcycle.txt +motd.txt \ No newline at end of file diff --git a/tf2/Dockerfile b/tf2-wip/Dockerfile similarity index 55% rename from tf2/Dockerfile rename to tf2-wip/Dockerfile index f05ba83..06a5378 100644 --- a/tf2/Dockerfile +++ b/tf2-wip/Dockerfile @@ -1,17 +1,6 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386 \ - && apt-get update \ - && apt-get install -y \ - libstdc++6:i386 \ - libcurl3-gnutls-dev:i386 \ - libcurl4-gnutls-dev:i386 \ - libstdc++6:i386 \ - libncurses5:i386 \ - libtinfo5:i386 \ - gdb:i386 ENV GAME=tf2 ENV APP_ID=232250 @@ -21,14 +10,25 @@ RUN chown -R steam /steam/${GAME}/ USER steam +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +RUN mkdir -p /steam/${GAME}/tf/cfg/ + COPY configure.sh \ -launch.sh \ -start.sh \ -./ + start.sh \ + ./ +COPY server.cfg \ + mapcycle.txt \ + motd.txt \ + ./tf/cfg/ -ARG CACHE_DATE -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +USER root +RUN chown steam:steam tf/cfg/ * \ + && mkdir -p /home/steam/.steam/sdk32/ \ + && ln -s /steam/steamcmd_linux/linux32/steamclient.so /home/steam/.steam/sdk32/ + +USER steam ENTRYPOINT ["./start.sh"] diff --git a/tf2/README.md b/tf2-wip/README.md similarity index 100% rename from tf2/README.md rename to tf2-wip/README.md diff --git a/tf2-wip/config-templates/mapcycle.template.txt b/tf2-wip/config-templates/mapcycle.template.txt new file mode 100644 index 0000000..d79f920 --- /dev/null +++ b/tf2-wip/config-templates/mapcycle.template.txt @@ -0,0 +1,44 @@ +cp_gravelpit +cp_dustbowl +cp_granary +cp_well +ctf_2fort +tc_hydro +ctf_well +cp_badlands +pl_goldrush +cp_fastlane +ctf_turbine +pl_badwater +cp_steel +cp_egypt_final +cp_junction_final +plr_pipeline +pl_hoodoo_final +koth_sawmill +koth_nucleus +koth_viaduct +ctf_sawmill +cp_yukon_final +koth_harvest_final +ctf_doublecross +cp_gorge +cp_freight_final1 +pl_upward +plr_hightower +pl_thundermountain +cp_coldfront +cp_mountainlab +cp_degrootkeep +cp_5gorge +pl_frontier_final +plr_nightfall_final +koth_lakeside_final +koth_badlands +pl_barnblitz +cp_gullywash_final1 +cp_foundry +sd_doomsday +koth_king +cp_process_final +cp_standin_final \ No newline at end of file diff --git a/tf2-wip/config-templates/motd.template.txt b/tf2-wip/config-templates/motd.template.txt new file mode 100644 index 0000000..f9cf6a5 --- /dev/null +++ b/tf2-wip/config-templates/motd.template.txt @@ -0,0 +1 @@ +Welcome to the server! \ No newline at end of file diff --git a/tf2/config-templates/server.template.cfg b/tf2-wip/config-templates/server.template.cfg similarity index 98% rename from tf2/config-templates/server.template.cfg rename to tf2-wip/config-templates/server.template.cfg index 107da5a..2d62007 100644 --- a/tf2/config-templates/server.template.cfg +++ b/tf2-wip/config-templates/server.template.cfg @@ -112,6 +112,8 @@ sv_allowdownload 1 // Maximum allowed file size for uploading in MB net_maxfilesize 15 +sv_downloadurl "http://example.com/tf/maps/" + // Team Balancing // diff --git a/tf2-wip/configure.sh b/tf2-wip/configure.sh new file mode 100755 index 0000000..fa93e39 --- /dev/null +++ b/tf2-wip/configure.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +export HOSTNAME="${HOSTNAME:-My TF2 Server}" +export SV_CONTACT="${SV_CONTACT:-your@email.com}" +export SV_DOWNLOADURL="${SV_DOWNLOADURL:-auto}" +export LAN="${LAN:-0}" +export MAX_PLAYERS="${MAX_PLAYERS:-24}" +export PAUSABLE="${PAUSABLE:-0}" +export RCON_PASSWORD="${RCON_PASSWORD:-pass1234}" +export SV_VOICEENABLE="${SV_VOICEENABLE:-1}" +export SV_ALLTALK="${SV_ALLTALK:-0}" +export SV_BIRTHDAY="${SV_BIRTHDAY:-1}" + +if [ -z $SERVER_TOKEN ] +then + echo "Warning: No server token supplied" >&2 +fi + +if [[ $SV_DOWNLOADURL -eq "auto" ]] +then + INTERFACE=$(ip route | grep default | awk '{print $(NF)}') + IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + SV_DOWNLOADURL="http://$IPADDR/" +fi + +# Config file +[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" + +sed -i "s/hostname.\+/hostname ${HOSTNAME}/g" tf/cfg/server.cfg +sed -i "s/sv_contact.\+/sv_contact ${SV_CONTACT}/g" tf/cfg/server.cfg +sed -i "s/sv_downloadurl.\+/sv_downloadurl ${SV_DOWNLOADURL}/g" tf/cfg/server.cfg +sed -i "s/sv_lan.\+/sv_lan ${LAN}/g" tf/cfg/server.cfg +sed -i "s/sv_maxplayers.\+/sv_maxplayers "${MAX_PLAYERS}"/g" tf/cfg/server.cfg +sed -i "s/sv_pausable.\+/sv_pausable ${PAUSABLE}/g" tf/cfg/server.cfg +sed -i "s/rcon_password.\+/rcon_password ${RCON_PASSWORD}/g" tf/cfg/server.cfg +sed -i "s/sv_voiceenable.\+/sv_voiceenable ${SV_VOICEENABLE}/g" tf/cfg/server.cfg +sed -i "s/sv_alltalk.\+/sv_alltalk ${SV_ALLTALK}/g" tf/cfg/server.cfg +sed -i "s/sv_birthday.\+/sv_birthday ${SV_BIRTHDAY}/g" tf/cfg/server.cfg diff --git a/tf2-wip/start.sh b/tf2-wip/start.sh new file mode 100755 index 0000000..23e5ff1 --- /dev/null +++ b/tf2-wip/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./configure.sh +exec ./srcds_run -game tf -debug -ip 0.0.0.0 -usercon $MAPCYCLEFILE $OTHER_ARGS $@ diff --git a/tf2-wip/tv.sh b/tf2-wip/tv.sh new file mode 100644 index 0000000..0001697 --- /dev/null +++ b/tf2-wip/tv.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# TODO figure out TV, I don't use it +#if [[ -n $SOURCETV_ADDR ]]; then +# echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg +# exec ./srcds_run -game tf -debug -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +#else \ No newline at end of file diff --git a/tf2/configure.sh b/tf2/configure.sh deleted file mode 100755 index a12ecee..0000000 --- a/tf2/configure.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -if [ -z $SERVER_TOKEN ] -then - echo "Warning: No server token supplied" >&2 -fi - -if [[ $SV_DOWNLOADURL -eq "auto" ]] -then - INTERFACE=$(ip route | grep default | awk '{print $(NF)}') - IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - SV_DOWNLOADURL="http://$IPADDR/" - -fi - -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" - -[[ -z "$MAP" ]] && MAP="cp_badlands" -MAP="+map $MAP" - -[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers $MAXPLAYERS" -[[ -n $MAPCYCLEFILE ]] && MAPCYCLEFILE="+mapcyclefile $MAPCYCLEFILE" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" - -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server" - -cat </steam/tf2/tf/cfg/server.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -$SV_DOWNLOADURL -EOF diff --git a/tf2/launch.sh b/tf2/launch.sh deleted file mode 100755 index 6b7f2eb..0000000 --- a/tf2/launch.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ -n $SOURCETV_ADDR ]]; then - echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg - exec ./srcds_run -game tf -debug +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ -else - exec ./srcds_run -game tf -debug +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ -fi \ No newline at end of file diff --git a/tf2/start.sh b/tf2/start.sh deleted file mode 100755 index eb52bf8..0000000 --- a/tf2/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./configure.sh -./launch.sh From 969d15b1eda928eb2d087236e05028fb10f4e49e Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 29 Aug 2024 21:55:38 +0100 Subject: [PATCH 48/55] refactor base, steamcmd, and update l4d2 --- base/Dockerfile | 7 ++++--- docker_build.sh | 9 ++++++++- l4d2-metamod/Dockerfile | 21 +++++++++++---------- l4d2-metamod/download.sh | 5 ++--- l4d2-multislot/.dockerignore | 5 +++++ l4d2-multislot/Dockerfile | 2 ++ l4d2-multislot/update_config.sh | 2 +- l4d2/.dockerignore | 3 ++- steamcmd/.dockerignore | 3 +++ steamcmd/Dockerfile | 7 +++---- 10 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 l4d2-multislot/.dockerignore create mode 100644 steamcmd/.dockerignore diff --git a/base/Dockerfile b/base/Dockerfile index a14880d..5b235aa 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -13,14 +13,15 @@ RUN apt-get update \ curl\ wget\ lib32gcc1\ + lib32stdc++6\ iproute2\ vim-tiny\ bzip2\ jq\ software-properties-common\ apt-transport-https\ - lib32stdc++6\ rsync \ && apt-get clean -RUN echo "$TZ" > /etc/timezone -RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime + +RUN echo "$TZ" > /etc/timezone \ + && ln -fs /usr/share/zoneinfo/$TZ /etc/localtime diff --git a/docker_build.sh b/docker_build.sh index 4a728e9..c462e99 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -17,7 +17,14 @@ do echo "Building ${i}..." cd ${i} echo "Using CACHE_DATE in case updates have been made..." - DOCKER_BUILDKIT=1 docker build --progress=plain --build-arg CACHE_DATE="$(date)" -t ${i} . + DOCKER_BUILDKIT=1 \ + docker build \ + --progress=plain \ + --build-arg CACHE_DATE="$(date)" \ + -t ${i} \ + -t ${i}:latest \ + -t ${i}:$(date +"%Y%m%d-%H%M%S") \ + . cd ${BASE_DIR} done diff --git a/l4d2-metamod/Dockerfile b/l4d2-metamod/Dockerfile index bcd4bb7..366e67b 100644 --- a/l4d2-metamod/Dockerfile +++ b/l4d2-metamod/Dockerfile @@ -1,26 +1,27 @@ FROM l4d2 USER root -RUN apt-get update; apt-get install -y lib32gcc1 lib32stdc++6 WORKDIR /steam/l4d2/ USER steam -ENV LEFT4DEAD2_DIR "/steam/l4d2/left4dead2" -ENV ADDONS_DIR "${LEFT4DEAD2_DIR}/addons" -ENV SOURCEMOD_DIR "${ADDONS_DIR}/sourcemod" -ENV SOURCEMOD_EXTENSIONS_DIR "${SOURCEMOD_DIR}/extensions" -ENV SOURCEMOD_PLUGINS_DIR "${SOURCEMOD_DIR}/plugins" +# these can't be set as one block as docker does not set them until the command completes +ENV LEFT4DEAD2_DIR="/steam/l4d2/left4dead2" +ENV ADDONS_DIR="${LEFT4DEAD2_DIR}/addons" +ENV SOURCEMOD_DIR="${ADDONS_DIR}/sourcemod" +ENV SOURCEMOD_EXTENSIONS_DIR="${SOURCEMOD_DIR}/extensions" +ENV SOURCEMOD_PLUGINS_DIR="${SOURCEMOD_DIR}/plugins" +ENV TEMP_DIR="/tmp/download" -RUN mkdir -p "${SOURCEMOD_EXTENSIONS_DIR}/" -RUN mkdir -p "${SOURCEMOD_PLUGINS_DIR}/" +RUN mkdir -p "${SOURCEMOD_EXTENSIONS_DIR}/" \ + && mkdir -p "${SOURCEMOD_PLUGINS_DIR}/" -COPY download.sh . +COPY download.sh ./ RUN ./download.sh COPY metamod.vdf left4dead2/ COPY admins_simple.ini "${SOURCEMOD_DIR}/configs/admins_simple.ini" -RUN rm /steam/l4d2/left4dead2/addons/sourcemod/plugins/nextmap.smx +RUN rm "${SOURCEMOD_PLUGINS_DIR}/nextmap.smx" ENTRYPOINT ["./start.sh"] diff --git a/l4d2-metamod/download.sh b/l4d2-metamod/download.sh index 5d9d287..a20cb8a 100755 --- a/l4d2-metamod/download.sh +++ b/l4d2-metamod/download.sh @@ -17,16 +17,15 @@ curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" tar -xf sourcemod*.tar.gz -C "${LEFT4DEAD2_DIR}/" # http://www.bailopan.net/stripper/ -# http://www.bailopan.net/stripper/files/stripper-1.2.2-linux.tar.gz curl -o stripper.tar.gz 'http://www.bailopan.net/stripper/files/stripper-1.2.2-linux.tar.gz' tar -xf stripper.tar.gz -C "${LEFT4DEAD2_DIR}/" # Source Scramble (memory patching and allocation natives) # https://forums.alliedmods.net/showthread.php?p=2657347 -curl -L https://github.com/nosoop/SMExt-SourceScramble/releases/download/0.7.0/package.tar.gz > SourceScramble.tar.gz +curl -L https://github.com/nosoop/SMExt-SourceScramble/releases/download/0.7.1.4/package.tar.gz > SourceScramble.tar.gz tar -xf SourceScramble.tar.gz -C "${LEFT4DEAD2_DIR}/" -# [L4D1&2] Scene Processor +# [L4D1&2] Scene Processor # https://forums.alliedmods.net/showpost.php?p=2766130&postcount=59 curl -o sceneprocessor.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=192668&d=1639588615' unzipAndMoveToDir sceneprocessor.zip "${LEFT4DEAD2_DIR}/" diff --git a/l4d2-multislot/.dockerignore b/l4d2-multislot/.dockerignore new file mode 100644 index 0000000..4c60a51 --- /dev/null +++ b/l4d2-multislot/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +Dockerfile +config-templates +README.md diff --git a/l4d2-multislot/Dockerfile b/l4d2-multislot/Dockerfile index fb52bc8..62f0187 100644 --- a/l4d2-multislot/Dockerfile +++ b/l4d2-multislot/Dockerfile @@ -3,12 +3,14 @@ FROM l4d2-metamod WORKDIR /steam/l4d2/ USER steam +# <- don't try and refactor this house of cards COPY download.sh . RUN ./download.sh COPY *.cfg "${LEFT4DEAD2_DIR}/cfg/sourcemod/" COPY update_config.sh . +# -/> USER root RUN chown -R steam:steam update_config.sh diff --git a/l4d2-multislot/update_config.sh b/l4d2-multislot/update_config.sh index dad573b..e9af2b3 100755 --- a/l4d2-multislot/update_config.sh +++ b/l4d2-multislot/update_config.sh @@ -42,5 +42,5 @@ l4d2_survivor_set "3" // Default: "0" // Minimum: "0.000000" // Maximum: "1.000000" -l4d2_manage_people "0" +l4d2_manage_people "0" EOF diff --git a/l4d2/.dockerignore b/l4d2/.dockerignore index eb0ae03..7d480a6 100644 --- a/l4d2/.dockerignore +++ b/l4d2/.dockerignore @@ -4,4 +4,5 @@ README.md .cache-info .dockerignore .env -.gitignore \ No newline at end of file +.gitignore +.git diff --git a/steamcmd/.dockerignore b/steamcmd/.dockerignore new file mode 100644 index 0000000..ce2d52c --- /dev/null +++ b/steamcmd/.dockerignore @@ -0,0 +1,3 @@ +.git +.gitignore +Dockerfile diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index 2de900e..4f28f87 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -23,7 +23,6 @@ USER steam WORKDIR /steam/steamcmd_linux -RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -RUN tar -xf steamcmd_linux.tar.gz - -RUN ./steamcmd.sh +login anonymous +quit +RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz \ + && tar -xf steamcmd_linux.tar.gz \ + && ./steamcmd.sh +login anonymous +quit From 38de9c6d062cf71a755d42d22f3de9e5e725a3f9 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Thu, 29 Aug 2024 21:56:40 +0100 Subject: [PATCH 49/55] remove legacy .cache-info remnants --- css/.cache-info | 1 - insurgency/.cache-info | 1 - legacy/hl2dm/.cache-info | 1 - 3 files changed, 3 deletions(-) delete mode 100644 css/.cache-info delete mode 100644 insurgency/.cache-info delete mode 100644 legacy/hl2dm/.cache-info diff --git a/css/.cache-info b/css/.cache-info deleted file mode 100644 index d1667d5..0000000 --- a/css/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/css \ No newline at end of file diff --git a/insurgency/.cache-info b/insurgency/.cache-info deleted file mode 100644 index 0ad29b2..0000000 --- a/insurgency/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/insurgency2 \ No newline at end of file diff --git a/legacy/hl2dm/.cache-info b/legacy/hl2dm/.cache-info deleted file mode 100644 index 2f02d71..0000000 --- a/legacy/hl2dm/.cache-info +++ /dev/null @@ -1 +0,0 @@ -/steam/hl2dm \ No newline at end of file From 7113fcdc61490368ad69af87fd8b578f22e59f8c Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 30 Aug 2024 11:20:56 +0100 Subject: [PATCH 50/55] l4d2 start.sh fix --- l4d2/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 499dc4e..e973b56 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -15,9 +15,9 @@ RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -COPY configure.sh ./ \ - start.sh ./ \ - server.cfg left4dead2/cfg/ +COPY configure.sh \ + start.sh ./ +COPY server.cfg left4dead2/cfg/ USER root RUN chown steam:steam left4dead2/cfg/server.cfg From d393a1019b1ede0de3a8096e3cee6b3a14fa6a85 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 30 Aug 2024 11:25:36 +0100 Subject: [PATCH 51/55] css updates --- css-gungame/Dockerfile | 9 ++- css-gungame/README.md | 11 --- css-gungame/download.sh | 10 +-- css-gungame/start.sh | 22 ------ css-hideandseek/Dockerfile | 4 +- css-hideandseek/README.md | 11 --- css-hideandseek/start.sh | 22 ------ css-metamod/Dockerfile | 8 ++- css/Dockerfile | 7 +- css-metamod/start.sh => css/configure.sh | 12 +--- css/start.sh | 86 +----------------------- 11 files changed, 25 insertions(+), 177 deletions(-) delete mode 100755 css-gungame/start.sh delete mode 100755 css-hideandseek/start.sh rename css-metamod/start.sh => css/configure.sh (84%) mode change 100755 => 100644 diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile index 6077089..4e62b88 100644 --- a/css-gungame/Dockerfile +++ b/css-gungame/Dockerfile @@ -4,12 +4,15 @@ USER steam WORKDIR /steam/css/cstrike -ADD download.sh . +COPY download.sh . RUN ./download.sh WORKDIR /steam/css -ADD start.sh . -ADD gungame.config.txt /steam/css/addons/sourcemod/plugins/cfg/gungame/gungame.config.txt +COPY gungame.config.txt /steam/css/addons/sourcemod/plugins/cfg/gungame/gungame.config.txt + +RUN echo -e "mp_ignore_round_win_conditions 1 " >> /steam/css/cstrike/cfg/server.cfg + +ENV SV_HOSTNAME="Counterstrike Source (GunGame)" ENTRYPOINT [ "./start.sh" ] diff --git a/css-gungame/README.md b/css-gungame/README.md index 4d62c3f..6ac0e51 100644 --- a/css-gungame/README.md +++ b/css-gungame/README.md @@ -2,8 +2,6 @@ Counterstrike Source Gun Game server based on the css-metamod docker image. -No bot support! - ## Build notes 1. Build the `css` docker image @@ -13,12 +11,3 @@ No bot support! ## Plugins * [CS:S/CS:GO GunGame](https://forums.alliedmods.net/showthread.php?t=93977) - -## Environment variables - -* `RCON_PASSWORD` -* `SV_PASSWORD` -* `SV_HOSTNAME` -* `LAN` -* `MAP` -* `MAXPLAYERS` diff --git a/css-gungame/download.sh b/css-gungame/download.sh index 5717544..9587902 100755 --- a/css-gungame/download.sh +++ b/css-gungame/download.sh @@ -1,9 +1,9 @@ #! /bin/bash +# https://forums.alliedmods.net/showthread.php?t=93977 curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' -curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' -unzip sm_gungame.zip -unzip sm_ggdm-1.8.0.zip +unzip -o sm_gungame.zip -curl -o bot_endround.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=45192' -mv bot_endround.smx addons/sourcemod/plugins/bot_endround.smx +# https://forums.alliedmods.net/showthread.php?t=103242 +curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' +unzip -o sm_ggdm-1.8.0.zip diff --git a/css-gungame/start.sh b/css-gungame/start.sh deleted file mode 100755 index 1e45e07..0000000 --- a/css-gungame/start.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="de_dust2" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Gungame)" - -# Create config file -cat </steam/css/cstrike/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -EOF - -echo "$FULL_ADMINS" > css/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css-hideandseek/Dockerfile b/css-hideandseek/Dockerfile index cff8f0f..0e876aa 100644 --- a/css-hideandseek/Dockerfile +++ b/css-hideandseek/Dockerfile @@ -4,12 +4,12 @@ USER steam WORKDIR /steam/css/cstrike -ADD download.sh . +COPY download.sh . RUN ./download.sh && \ unzip sm_hideandseek.zip WORKDIR /steam/css -ADD start.sh . +ENV SV_HOSTNAME="Counterstrike Source (Hide and Seek)" ENTRYPOINT [ "./start.sh" ] diff --git a/css-hideandseek/README.md b/css-hideandseek/README.md index 2dc75b5..4bc29c4 100644 --- a/css-hideandseek/README.md +++ b/css-hideandseek/README.md @@ -2,8 +2,6 @@ Counterstrike Source Hide and Seek server based on the css-metamod docker image. -No bot support! - ## Build notes 1. Build the `css` docker image @@ -13,12 +11,3 @@ No bot support! ## Plugins * [CS:S Hide and seek](https://forums.alliedmods.net/showthread.php?p=1158242) - -## Environment variables - -* `RCON_PASSWORD` -* `SV_PASSWORD` -* `SV_HOSTNAME` -* `LAN` -* `MAP` -* `MAXPLAYERS` diff --git a/css-hideandseek/start.sh b/css-hideandseek/start.sh deleted file mode 100755 index 2b37957..0000000 --- a/css-hideandseek/start.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="cs_office" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Hide and Seek)" - -# Create config file -cat </steam/css/cstrike/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -EOF - -echo "$FULL_ADMINS" > css/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css-metamod/Dockerfile b/css-metamod/Dockerfile index 5494a67..58d799c 100644 --- a/css-metamod/Dockerfile +++ b/css-metamod/Dockerfile @@ -2,7 +2,7 @@ FROM css WORKDIR /steam/css/ USER steam -ADD download.sh . +COPY download.sh . RUN ./download.sh RUN tar -xf mm*.tar.gz -C cstrike/ && \ @@ -12,8 +12,10 @@ RUN tar -xf mm*.tar.gz -C cstrike/ && \ mv cstrike/addons/sourcemod/plugins/disabled/randomcycle.smx cstrike/addons/sourcemod/plugins/randomcycle.smx && \ mv cstrike/addons/sourcemod/plugins/disabled/rockthevote.smx cstrike/addons/sourcemod/plugins/rockthevote.smx -ADD metamod.vdf cstrike/ +COPY metamod.vdf cstrike/ -ADD start.sh . +RUN echo '"$FULL_ADMINS" "@Full Admins"' > cstrike/addons/sourcemod/configs/admins_simple.ini + +ENV SV_HOSTNAME="Counterstrike Source (MetaMod)" ENTRYPOINT [ "./start.sh" ] diff --git a/css/Dockerfile b/css/Dockerfile index 2b6632e..a8b9ba3 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -13,7 +13,10 @@ RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -COPY start.sh \ -./ +COPY configure.sh \ + start.sh \ + ./ + +ENV SV_HOSTNAME="Counterstrike Source (Base)" ENTRYPOINT ["./start.sh"] diff --git a/css-metamod/start.sh b/css/configure.sh old mode 100755 new mode 100644 similarity index 84% rename from css-metamod/start.sh rename to css/configure.sh index 09c60a6..4268081 --- a/css-metamod/start.sh +++ b/css/configure.sh @@ -1,15 +1,9 @@ #!/bin/bash -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="de_dust" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" - # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" [[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Metamod)" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Base)" # mp config [[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 @@ -88,7 +82,3 @@ bot_allow_snipers $BOT_ALLOW_SNIPERS bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS EOF - -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css/start.sh b/css/start.sh index 09c60a6..0adf80e 100755 --- a/css/start.sh +++ b/css/start.sh @@ -4,91 +4,7 @@ [[ $LAN -ge 1 ]] && LAN="1" || LAN="0" [[ -z "$MAP" ]] && MAP="de_dust" [[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Metamod)" - -# mp config -[[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 -[[ -z $MP_MAXROUNDS ]] && MP_MAXROUNDS=15 -[[ -z $MP_ROUNDTIME ]] && MP_ROUNDTIME=3.5 -[[ -z $MP_AUTOTEAMBALANCE ]] && MP_AUTOTEAMBALANCE=0 - -# bot config -# how many bots? -[[ -z $BOT_QUOTA ]] && BOT_QUOTA=0 - -# fill = If a player joins, the Bot will be kicked -# normal = If a player joins, the Bot won´t be kicked -[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=normal - -# bots populate after a player joins the server -# 0 = bots always present -# 1 = bots join after humans -[[ -z $BOT_JOIN_AFTER_PLAYER ]] && BOT_JOIN_AFTER_PLAYER=1 - -# 0 = easy -# 1 = normal -# 2 = hard -# 3 = extreme -[[ -z $BOT_DIFFICULTY ]] && BOT_DIFFICULTY=2 - -[[ -z $BOT_PREFIX ]] && BOT_PREFIX=[BOT] - -# Bots defuse the bombs etc... -# 0 = Bots allowed -# 1 = Humans only) -[[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 - -# kick bot when slots fill -# 0 = don't kick the bot -# 1 = kick the bot -[[ -z $BOT_AUTO_VACATE ]] && BOT_AUTO_VACATE=1 - -# on, off, radio, minimal, normal -[[ -z $BOT_CHATTER ]] && BOT_CHATTER=minimal - -# bot weapon set -[[ -z $BOT_ALLOW_GRENADES ]] && BOT_ALLOW_GRENADES=1 -[[ -z $BOT_ALLOW_PISTOLS ]] && BOT_ALLOW_PISTOLS=1 -[[ -z $BOT_ALLOW_RIFLES ]] && BOT_ALLOW_RIFLES=1 -[[ -z $BOT_ALLOW_ROGUES ]] && BOT_ALLOW_ROGUES=1 -[[ -z $BOT_ALLOW_SHOTGUNS ]] && BOT_ALLOW_SHOTGUNS=1 -[[ -z $BOT_ALLOW_SNIPERS ]] && BOT_ALLOW_SNIPERS=1 -[[ -z $BOT_ALLOW_MACHINE_GUNS ]] && BOT_ALLOW_MACHINE_GUNS=1 -[[ -z $BOT_ALLOW_SUB_MACHINE_GUNS ]] && BOT_ALLOW_SUB_MACHINE_GUNS=1 - -# Create config file -cat </steam/css/cstrike/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -mp_friendlyfire $MP_FRIENDLYFIRE -mp_timelimit $MP_TIMELIMIT -mp_maxrounds $MP_MAXROUNDS -mp_roundtime $MP_ROUNDTIME -mp_autoteambalance $MP_AUTOTEAMBALANCE -bot_quota $BOT_QUOTA -bot_quota_mode $BOT_QUOTA_MODE -bot_join_after_player $BOT_JOIN_AFTER_PLAYER -bot_difficulty $BOT_DIFFICULTY -bot_prefix $BOT_PREFIX -bot_defer_to_human $BOT_DEFER_TO_HUMAN -bot_auto_vacate $BOT_AUTO_VACATE -bot_chatter $BOT_CHATTER -bot_allow_grenades $BOT_ALLOW_GRENADES -bot_allow_pistols $BOT_ALLOW_PISTOLS -bot_allow_rifles $BOT_ALLOW_RIFLES -bot_allow_rogues $BOT_ALLOW_ROGUES -bot_allow_shotguns $BOT_ALLOW_SHOTGUNS -bot_allow_snipers $BOT_ALLOW_SNIPERS -bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS -bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS -EOF - -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini +./configure.sh exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ From 8ca98736a024da17ecb51b25acb8420303a7c801 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 30 Aug 2024 11:27:55 +0100 Subject: [PATCH 52/55] move DOCKER_BUILDKIT from docker build --- docker_build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker_build.sh b/docker_build.sh index c462e99..d9e31ff 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -3,6 +3,7 @@ set -e BASE_DIR=$(pwd) +export DOCKER_BUILDKIT=${DOCKER_BUILDKIT:-1} mkdir -p .cache @@ -17,9 +18,7 @@ do echo "Building ${i}..." cd ${i} echo "Using CACHE_DATE in case updates have been made..." - DOCKER_BUILDKIT=1 \ docker build \ - --progress=plain \ --build-arg CACHE_DATE="$(date)" \ -t ${i} \ -t ${i}:latest \ From dc5c44526bedf6b7713a1c15333aafc483ece651 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 30 Aug 2024 11:29:22 +0100 Subject: [PATCH 53/55] use COPY instead of ADD --- insurgency/Dockerfile | 2 +- minecraft/Dockerfile | 2 +- openttd/Dockerfile | 4 ++-- trackmania-forever-rcon/Dockerfile | 6 +++--- trackmania-forever/Dockerfile | 6 +++--- ut2004/Dockerfile | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile index 6191978..a9dd7e9 100644 --- a/insurgency/Dockerfile +++ b/insurgency/Dockerfile @@ -20,7 +20,7 @@ RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam ARG CACHE_DATE RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -ADD default_server_cooperative.cfg /steam/insurgency2/insurgency/cfg/default_server_cooperative.cfg +COPY default_server_cooperative.cfg /steam/insurgency2/insurgency/cfg/default_server_cooperative.cfg COPY start.sh \ ./ diff --git a/minecraft/Dockerfile b/minecraft/Dockerfile index 40e0c84..1a69c84 100644 --- a/minecraft/Dockerfile +++ b/minecraft/Dockerfile @@ -8,7 +8,7 @@ RUN echo "yes" | apt-get install -y oracle-java7-installer RUN adduser minecraft && mkdir /minecraft && chown minecraft:minecraft /minecraft WORKDIR /minecraft -ADD minecraft_server*.jar start.sh advertise.py eula.txt server.properties /minecraft/ +COPY minecraft_server*.jar start.sh advertise.py eula.txt server.properties /minecraft/ # This fails, diff --git a/openttd/Dockerfile b/openttd/Dockerfile index d943060..95660a5 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update \ WORKDIR /tmp ARG DISTRO="focal" -ADD download.sh . +COPY download.sh . RUN ./download.sh USER root @@ -26,7 +26,7 @@ USER openttd WORKDIR /usr/games -ADD start.sh . +COPY start.sh . VOLUME [ "/home/openttd/.openttd/save" ] diff --git a/trackmania-forever-rcon/Dockerfile b/trackmania-forever-rcon/Dockerfile index 7d10f0b..b763a69 100644 --- a/trackmania-forever-rcon/Dockerfile +++ b/trackmania-forever-rcon/Dockerfile @@ -1,9 +1,9 @@ FROM base RUN apt-get install -y nginx php7.0-common php7.0-cli php7.0-fpm php-xml-parser -ADD RemoteControlExamples/PhpRemote/* /var/www/html/ -ADD default.conf /etc/nginx/sites-available/default -ADD start.sh /start.sh +COPY RemoteControlExamples/PhpRemote/* /var/www/html/ +COPY default.conf /etc/nginx/sites-available/default +COPY start.sh /start.sh RUN mkdir /run/php # for phpfpm CMD ["/start.sh"] diff --git a/trackmania-forever/Dockerfile b/trackmania-forever/Dockerfile index 63f49bf..4535d9f 100644 --- a/trackmania-forever/Dockerfile +++ b/trackmania-forever/Dockerfile @@ -10,9 +10,9 @@ WORKDIR /tm RUN curl -o TrackmaniaServer_2011-02-21.zip http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip && \ unzip *.zip -ADD tracklist*.cfg GameData/Tracks/ -ADD dedicated_cfg.txt GameData/Config/ +COPY tracklist*.cfg GameData/Tracks/ +COPY dedicated_cfg.txt GameData/Config/ -Add start.sh . +COPY start.sh . ENTRYPOINT ["./start.sh"] diff --git a/ut2004/Dockerfile b/ut2004/Dockerfile index 5621b49..a787685 100644 --- a/ut2004/Dockerfile +++ b/ut2004/Dockerfile @@ -8,9 +8,9 @@ RUN dpkg --add-architecture i386 \ WORKDIR ut2004 -ADD download.sh . +COPY download.sh . RUN ./download.sh -ADD start.sh . +COPY start.sh . -CMD ["./start.sh"] +ENTRYPOINT ["./start.sh"] From 04792b3f63fa3738322fd9ac45829bbc7f9afc3f Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Fri, 30 Aug 2024 22:17:47 +0100 Subject: [PATCH 54/55] css and gungame improvements --- css-gungame/Dockerfile | 6 +++--- css-gungame/configure.sh | 7 +++++++ css-gungame/gungame.config.txt | 10 +++++----- css/.dockerignore | 4 ++-- css/configure.sh | 4 ++-- 5 files changed, 19 insertions(+), 12 deletions(-) create mode 100755 css-gungame/configure.sh mode change 100644 => 100755 css/configure.sh diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile index 4e62b88..d8fc841 100644 --- a/css-gungame/Dockerfile +++ b/css-gungame/Dockerfile @@ -9,9 +9,9 @@ RUN ./download.sh WORKDIR /steam/css -COPY gungame.config.txt /steam/css/addons/sourcemod/plugins/cfg/gungame/gungame.config.txt - -RUN echo -e "mp_ignore_round_win_conditions 1 " >> /steam/css/cstrike/cfg/server.cfg +COPY gungame.config.txt /steam/css/cstrike/cfg/gungame/css/gungame.config.txt +RUN mv configure.sh configure-base.sh +COPY configure.sh . ENV SV_HOSTNAME="Counterstrike Source (GunGame)" diff --git a/css-gungame/configure.sh b/css-gungame/configure.sh new file mode 100755 index 0000000..59eb8af --- /dev/null +++ b/css-gungame/configure.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +./configure-base.sh + +echo "mp_ignore_round_win_conditions 1" >> /steam/css/cstrike/cfg/server.cfg + +# echo sm_mapvote_endvote > /steam/css/cstrike/cfg/gungame/css/gungame.mapvote.cfg diff --git a/css-gungame/gungame.config.txt b/css-gungame/gungame.config.txt index 4fa932b..67fdce4 100644 --- a/css-gungame/gungame.config.txt +++ b/css-gungame/gungame.config.txt @@ -162,7 +162,7 @@ "AlltalkOnWin" "1" /* Start voting if leader level is less maximum level by this value */ - "VoteLevelLessWeaponCount" "2" + "VoteLevelLessWeaponCount" "0" /* Display a join message, popup giving players instructions on how to play */ "JoinMessage" "1" @@ -467,7 +467,7 @@ "ExtraNade" "0" /* Gives unlimited hegrenades to the player if he is on nage level */ - "UnlimitedNades" "0" + "UnlimitedNades" "1" /** * Enable UnlimitedNades depending on the number of players in team. @@ -524,7 +524,7 @@ "WarmupEnabled" "1" /* Warmup time length */ - "WarmupTimeLength" "60" + "WarmupTimeLength" "30" /** * Give random weapon on warmup. @@ -535,7 +535,7 @@ * 2 - Random weapon every round * 3 - Random weapon every spawn */ - "WarmupRandomWeaponMode" "0" + "WarmupRandomWeaponMode" "3" /** * Gives unlimited hegrenades to the player if warmup is enabled. @@ -644,4 +644,4 @@ "Winner" "gungame/winner.mp3" // (�) VALVE "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE } -} \ No newline at end of file +} diff --git a/css/.dockerignore b/css/.dockerignore index eb0ae03..7457660 100644 --- a/css/.dockerignore +++ b/css/.dockerignore @@ -1,7 +1,7 @@ /config-templates Dockerfile README.md -.cache-info .dockerignore .env -.gitignore \ No newline at end of file +.gitignore +.git diff --git a/css/configure.sh b/css/configure.sh old mode 100644 new mode 100755 index 4268081..b6c9727 --- a/css/configure.sh +++ b/css/configure.sh @@ -17,7 +17,7 @@ # fill = If a player joins, the Bot will be kicked # normal = If a player joins, the Bot won´t be kicked -[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=normal +[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=fill # bots populate after a player joins the server # 0 = bots always present @@ -34,7 +34,7 @@ # Bots defuse the bombs etc... # 0 = Bots allowed -# 1 = Humans only) +# 1 = Humans only [[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 # kick bot when slots fill From 7e92a5b7d7581f4d575ca5feb526dcbcb615c938 Mon Sep 17 00:00:00 2001 From: Matthew Hayward Date: Mon, 2 Sep 2024 23:15:28 +0100 Subject: [PATCH 55/55] rework css configuration and add deathmatch --- css-deathmatch/.dockerignore | 4 + css-deathmatch/.gitignore | 0 css-deathmatch/Dockerfile | 20 + css-deathmatch/README.md | 13 + .../cfg/gungame/css}/gungame.config.txt | 8 +- .../config/cfg/gungame/css/gungame.equip.txt | 107 +++ css-deathmatch/configure-deathmatch.sh | 3 + css-deathmatch/configure.sh | 5 + css-deathmatch/download.sh | 6 + css-gungame/.dockerignore | 4 + css-gungame/.gitignore | 0 css-gungame/Dockerfile | 16 +- css-gungame/README.md | 3 +- .../cfg/gungame/css/gungame.config.txt | 647 ++++++++++++++++++ .../cstrike/cfg/gungame/css/gungame.equip.txt | 107 +++ css-gungame/configure-gungame.sh | 1 + css-gungame/configure.sh | 7 +- css-gungame/download.sh | 7 +- css-hideandseek/.dockerignore | 3 + css-hideandseek/Dockerfile | 7 +- css-hideandseek/configure.sh | 4 + css-hideandseek/download.sh | 2 + css-metamod/Dockerfile | 22 +- .../sourcemod/configs/admin_overrides.cfg | 10 + .../mapchooser_extended/maps/cstrike.txt | 18 + css-metamod/configure-metamod.sh | 5 + css-metamod/configure.sh | 4 + css-metamod/download.sh | 18 + css/Dockerfile | 10 +- css/config/cstrike/cfg/motd.txt | 40 ++ css/config/cstrike/cfg/motd_text.txt | 3 + css/config/cstrike/maps/copy-maps-here | 0 css/configure-base.sh | 86 +++ css/configure.sh | 85 +-- css/generate-mapcycle.sh | 38 + 35 files changed, 1193 insertions(+), 120 deletions(-) create mode 100644 css-deathmatch/.dockerignore create mode 100644 css-deathmatch/.gitignore create mode 100644 css-deathmatch/Dockerfile create mode 100644 css-deathmatch/README.md rename {css-gungame => css-deathmatch/config/cfg/gungame/css}/gungame.config.txt (99%) create mode 100644 css-deathmatch/config/cfg/gungame/css/gungame.equip.txt create mode 100755 css-deathmatch/configure-deathmatch.sh create mode 100755 css-deathmatch/configure.sh create mode 100755 css-deathmatch/download.sh create mode 100644 css-gungame/.dockerignore create mode 100644 css-gungame/.gitignore create mode 100644 css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt create mode 100644 css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt create mode 100755 css-gungame/configure-gungame.sh create mode 100644 css-hideandseek/.dockerignore create mode 100755 css-hideandseek/configure.sh create mode 100644 css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg create mode 100644 css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt create mode 100755 css-metamod/configure-metamod.sh create mode 100755 css-metamod/configure.sh create mode 100644 css/config/cstrike/cfg/motd.txt create mode 100644 css/config/cstrike/cfg/motd_text.txt create mode 100644 css/config/cstrike/maps/copy-maps-here create mode 100755 css/configure-base.sh create mode 100755 css/generate-mapcycle.sh diff --git a/css-deathmatch/.dockerignore b/css-deathmatch/.dockerignore new file mode 100644 index 0000000..8c5f257 --- /dev/null +++ b/css-deathmatch/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +README.md +Dockerfile diff --git a/css-deathmatch/.gitignore b/css-deathmatch/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/css-deathmatch/Dockerfile b/css-deathmatch/Dockerfile new file mode 100644 index 0000000..51ffe71 --- /dev/null +++ b/css-deathmatch/Dockerfile @@ -0,0 +1,20 @@ +FROM css-metamod + +USER steam + +WORKDIR /steam/css/cstrike + +COPY --chown=steam download.sh . +RUN ./download.sh + +WORKDIR /steam/css + +COPY --chown=steam config/ /steam/css/cstrike/ + +COPY --chown=steam configure.sh \ + configure-deathmatch.sh \ + ./ + +ENV SV_HOSTNAME="Counterstrike Source (Deathmatch)" + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-deathmatch/README.md b/css-deathmatch/README.md new file mode 100644 index 0000000..3347770 --- /dev/null +++ b/css-deathmatch/README.md @@ -0,0 +1,13 @@ +# Counterstrike Source - Death Match + +Counterstrike Source Death Match server based on the css-metamod docker image. + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build this one! + +## Plugins + +* [CS:S/CS:GO DeathMatch SM](https://forums.alliedmods.net/showthread.php?t=103242) diff --git a/css-gungame/gungame.config.txt b/css-deathmatch/config/cfg/gungame/css/gungame.config.txt similarity index 99% rename from css-gungame/gungame.config.txt rename to css-deathmatch/config/cfg/gungame/css/gungame.config.txt index 67fdce4..a53a3bf 100644 --- a/css-gungame/gungame.config.txt +++ b/css-deathmatch/config/cfg/gungame/css/gungame.config.txt @@ -467,7 +467,7 @@ "ExtraNade" "0" /* Gives unlimited hegrenades to the player if he is on nage level */ - "UnlimitedNades" "1" + "UnlimitedNades" "0" /** * Enable UnlimitedNades depending on the number of players in team. @@ -524,7 +524,7 @@ "WarmupEnabled" "1" /* Warmup time length */ - "WarmupTimeLength" "30" + "WarmupTimeLength" "60" /** * Give random weapon on warmup. @@ -535,7 +535,7 @@ * 2 - Random weapon every round * 3 - Random weapon every spawn */ - "WarmupRandomWeaponMode" "3" + "WarmupRandomWeaponMode" "0" /** * Gives unlimited hegrenades to the player if warmup is enabled. @@ -644,4 +644,4 @@ "Winner" "gungame/winner.mp3" // (�) VALVE "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE } -} +} \ No newline at end of file diff --git a/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt b/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt new file mode 100644 index 0000000..a634045 --- /dev/null +++ b/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt @@ -0,0 +1,107 @@ +"GunGame.Weapon" +{ + "WeaponOrder" + { + /** + * Weapon Choices: + * There are a total of 64 levels by default. (To change this value you can edit the gungame_const.inc + * to change the maximum allowed level of the game by changing the define MAX_LEVEL) + * + * There are a total of 25 usable killing weapons for GunGame. + * By default weapon order only 23 levels and uses 23 out of 25 of the usable killing weapons. + * + * WARNING: + * DO NOT SKIP LEVELS in any config for WeaponOrder. + * ie .. Only have level 1 to 3 and skip 4 and use 5 to level 23. + * DO NOT SKIP LEVELS + * + * HandGuns: + * glock, usp, p228, deagle, fiveseven, elite + * + * Shotguns: + * m3, xm1014 + * + * Sub Machine Guns: + * tmp, mac10, mp5navy, ump45, p90 + * + * Rifles: + * galil, famas, ak47, scout, m4a1, sg552, + * aug, m249, awp + * + * Automatic Rifles: + * sg550, g3sg1 + * + * Machine Gun: + * m249 + * + * Other: + * knife, hegrenade + */ + + "1" "glock" + "2" "usp" + "3" "p228" + "4" "deagle" + "5" "fiveseven" + "6" "elite" + "7" "m3" + "8" "xm1014" + "9" "tmp" + "10" "mac10" + "11" "mp5navy" + "12" "ump45" + "13" "p90" + "14" "famas" + "15" "ak47" + "16" "m4a1" + "17" "sg552" + "18" "aug" + "19" "m249" + "20" "scout" + "21" "awp" + "22" "hegrenade" + "23" "knife" + + /** + * If RandomWeaponOrder is enabled, keep this levels unchanged. + * Use comma as a delimiter, do not use whitespace characters - only digits are allowed. + * Please keep this config line after levels list and before RandomWeaponOrder. + * + * "22,23" - keep knife and nade levels on defined levels + * "23" - keep knife level on defined level + * "" - randomize all levels + */ + "RandomWeaponReserveLevels" "" + + /** + * This will take the weapons in the WeaponOrder and randomize all the weapons order. + * Please keep this config line after levels list and after RandomWeaponReserveLevels. + */ + "RandomWeaponOrder" "0" + } + + "MultipleKillsPerLevel" + { + /** + * This is for custom kills per level will override default (MinKillsPerWeapon). + * Leave value at 0 if you do not want to override the default value. + * + * Example: + * + * For level 1 they must get 10 kills before they can level up. + * "1" "10" + * "2" "5" + * and so on. + * + * Or you can set kills per level for a perticular level. + * "1" "10" + * "3" "5" + * "5" "2" + * etc. + * + * Kills will count across all rounds so that you don't have to get them in one round. + * + * + */ + } +} diff --git a/css-deathmatch/configure-deathmatch.sh b/css-deathmatch/configure-deathmatch.sh new file mode 100755 index 0000000..937c76f --- /dev/null +++ b/css-deathmatch/configure-deathmatch.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "mp_ignore_round_win_conditions 1" >> /steam/css/cstrike/cfg/server.cfg diff --git a/css-deathmatch/configure.sh b/css-deathmatch/configure.sh new file mode 100755 index 0000000..241f0dd --- /dev/null +++ b/css-deathmatch/configure.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh +./configure-deathmatch.sh diff --git a/css-deathmatch/download.sh b/css-deathmatch/download.sh new file mode 100755 index 0000000..67fd51d --- /dev/null +++ b/css-deathmatch/download.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +# https://forums.alliedmods.net/showthread.php?t=103242 +curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' +unzip -o sm_ggdm-1.8.0.zip +rm -f sm_ggdm-1.8.0.zip diff --git a/css-gungame/.dockerignore b/css-gungame/.dockerignore new file mode 100644 index 0000000..8c5f257 --- /dev/null +++ b/css-gungame/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +README.md +Dockerfile diff --git a/css-gungame/.gitignore b/css-gungame/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile index d8fc841..d92f283 100644 --- a/css-gungame/Dockerfile +++ b/css-gungame/Dockerfile @@ -1,17 +1,17 @@ -FROM css-metamod +FROM css-deathmatch USER steam -WORKDIR /steam/css/cstrike +WORKDIR /steam/css -COPY download.sh . +COPY --chown=steam download.sh . RUN ./download.sh -WORKDIR /steam/css - -COPY gungame.config.txt /steam/css/cstrike/cfg/gungame/css/gungame.config.txt -RUN mv configure.sh configure-base.sh -COPY configure.sh . +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-gungame.sh \ + ./ ENV SV_HOSTNAME="Counterstrike Source (GunGame)" diff --git a/css-gungame/README.md b/css-gungame/README.md index 6ac0e51..b364ca5 100644 --- a/css-gungame/README.md +++ b/css-gungame/README.md @@ -6,7 +6,8 @@ Counterstrike Source Gun Game server based on the css-metamod docker image. 1. Build the `css` docker image 2. Build the `css-metamod` docker image -3. Build this one! +3. Build the `css-deathmatch` docker image +4. Build this one! ## Plugins diff --git a/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt b/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt new file mode 100644 index 0000000..a53a3bf --- /dev/null +++ b/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt @@ -0,0 +1,647 @@ +"GunGame.Config" +{ + "Config" + { + /* ===== [1. GUNGAME MAIN CONFIG] ===== */ + + /* ----- [1.1. main] ----- */ + + /* Enables/Disables GunGame Mod */ + "Enabled" "1" + + /** + * Do not fast switch on level up for this weapons. + * + * Comma-separated list + * of weapon names from gungame.equip.txt. + * + * Options: + * "hegrenade" - Enabled for hegrenade + * "hegrenade,taser" - Enabled for hegrenade and taser + * "taser,hegrenade,molotov,incgrenade" - Default value + * "" - Disabled + */ + "FastSwitchSkipWeapons" "hegrenade" + + /** + * Switch weapon without delays after level up. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnLevelUp" "1" + + /** + * Switch weapon without delays when player changes weapon by himself. + * + * SDK Hooks (sdkhooks) is required to use this option. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnChangeWeapon" "0" + + /** + * Freeze players after win. + * + * Options: + * 1 - Freeze players. + * 0 - Do not freeze players. + */ + "WinnerFreezePlayers" "0" + + /** + * Winner effects. + * + * Options: + * 0 - Freeze players. + * 1 - Make players fly. + */ + "WinnerEffect" "1" + + /** + * Delay before end of multiplayer game after gungame win. + * + * Options: + * 0 - Disabled. + * 1-N - Number of seconds. + */ + "EndGameDelay" "0" + + /** + * Sets how to finish the game after someone has won. + * + * Options: + * 0 - Normal game end with scoreboard, vote next map valve menu and weapon drops. + * 1 - Silent game end. + */ + "EndGameSilent" "0" + + /** + * Multiply sound effects volume. + * + * In CS:GO the volume is too low. + * You can up the volume with this multiplier. + * + * Options: + * 0-1 - Do not multiply + * 2-5 - Multiply by defined number of times + */ + "MultiplySoundVolume" "0" + + /** + * Block weapon switch if killer leveled up with knife + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchIfKnife" "1" + + /** + * Block weapon switch if you get next hegrenade + * after previous hegrenade explode or after getting extra nade. + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchOnNade" "1" + + /** + * Show players level message in hint box instead of chat. + * If enabled then multikill chat messages will be shown + * in hint box too (requres "MultiKillChat" "1"). + */ + "ShowSpawnMsgInHintBox" "0" + + /** + * Show leader level info in hint box + * (requires "ShowSpawnMsgInHintBox" to be "1") + */ + "ShowLeaderInHintBox" "0" + + /* Show leader's weapon name in chat with leading message */ + "ShowLeaderWeapon" "0" + + /** + * Strip dead players weapon + * + * Options: + * 0 - Disabled (default) + * 1 - Enabled for alive and dead players (alive players can not drop guns) + * 2 - Enabled for dead players only (alive players can drop guns) + */ + "StripDeadPlayersWeapon" "2" + + /* Show levels in scoreboard */ + "LevelsInScoreboard" "1" + + /** + * When shows levels in scoreboard it will + * clear deaths (requires "LevelsInScoreboard" "1") + */ + "ScoreboardClearDeaths" "0" + + /* Restore level on player reconnect */ + "RestoreLevelOnReconnect" "1" + + /* Allow level up after round end */ + "AllowLevelUpAfterRoundEnd" "1" + + /* Show multikill hints in chat */ + "MultiKillChat" "0" + + /* Set sv_alltalk 1 after player win */ + "AlltalkOnWin" "1" + + /* Start voting if leader level is less maximum level by this value */ + "VoteLevelLessWeaponCount" "0" + + /* Display a join message, popup giving players instructions on how to play */ + "JoinMessage" "1" + + /** + * Level down playr if they kill themself by WorldSpawn Suicide. + * 0 - Disable + * 1..N - Levels to loose + */ + "WorldspawnSuicide" "1" + + /** + * Level down players if they use the "kill" command + * 0 - Disable + * 1..N - Levels to loose + */ + "CommitSuicide" "1" + + /* How many levels they can gain in 1 round (0 - disabled) */ + "MaxLevelPerRound" "0" + + /* Turbo Mode: give next level weapon on level up */ + "TurboMode" "1" + + /* Knife Elite force them to only have a knife after they level up. + They will get a normal weapon again next round */ + "KnifeElite" "0" + + /** + * How many kills they need to with the weapon to get the next level + * Kills will count across all rounds so that you don't have to get them in one round. + */ + "MinKillsPerLevel" "1" + + /** + * Enabled friendly fire automatically when a player reaches hegrenade level. + * + * When nobody on nade level, than switches friendly fire back. + * This does not affect EnableFriendlyFireLevel and EnableFriendlyFireLevel is not requered to be enabled. + * See also FriendlyFireOnOff. + * + * 0 - Disabled + * 1 - Enable friendly fire on nade level. + */ + "AutoFriendlyFire" "0" + + /** + * FFA DM mode. + * + * If you are using CSS:DM with FFA mode enabled, + * then you should set this variable to "1". + * + * 0 - Disabled + * 1 - Enabled + */ + "FFA" "1" + + /** + * Enable friendly fire on defined level. + * + * This does not affect AutoFriendlyFire and AutoFriendlyFire is not requered to be 1. + * See also FriendlyFireOnOff. + * + * 0 - Disabled. + * 1..N - enable friendly fire on defined level. + */ + "EnableFriendlyFireLevel" "0" + + /** + * What to do with friendly fire when EnableFriendlyFireLevel is not 0 and leader reaches EnableFriendlyFireLevel + * or AutoFriendlyFire is 1 and someone reaches nade level. + * + * 1 - Enable friendy fire + * 0 - Disable friendy fire + */ + "FriendlyFireOnOff" "1" + + /** + * Disable rtv on defined level. 0 - disabled. + */ + "DisableRtvLevel" "0" + + /** + * If this option is enabled, than player can level up by killing with prop_physics. + * For example with fuel barrels etc. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysics" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on grenade level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnGrenade" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnKnife" "0" + + /** + * If this option is enabled, than player can level up by killing with nade at any time. + * For example there are maps having grenades on them leaved by the author. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithMapNades" "0" + + /** + * Use "CanLevelUpWithMapNades" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithNadeOnKnife" "0" + + /** + * Prevent players from using kill command. + */ + "SelfKillProtection" "1" + + /** + * Change game description. + * + * Requires SDK Hooks (sdkhooks). + * + * "{version}" will be changed to plugin version. + * + * Options: + * "" = Option disabled. + */ + "GameDesc" "GunGame:SM {version}" + + /* ----- [1.2. knifepro] ----- */ + + /* Turn Knife Pro allow stealing a player level by killing them with a knife */ + "KnifePro" "1" + + /* Enables Knife Pro when a player is on hegrenade level */ + "KnifeProHE" "0" + + /* The minimum level that a player must be at before another player can knife steal from. Requires KnifePro on */ + "KnifeProMinLevel" "0" + + /* If enabled then knife kill will also affect points */ + "KnifeProRecalcPoints" "0" + + /** + * Maximum level difference between players to allow steal level + * 0 - Disabled + * 1..N - Level difference between killer and victim + */ + "KnifeProMaxDiff" "0" + + /** + * Disable level down on knifepro. + * + * 1 - Level down disabled + * 0 - Level down enabled + */ + "DisableLevelDown" "0" + + /* ----- [1.3. objectives] ----- */ + + /* Give x number of level by completing the bomb planting/defusing objectives. + * Amount giving base on the value setting. + */ + "ObjectiveBonus" "1" + + /* Enables objective bonus on last level */ + "ObjectiveBonusWin" "0" + + /** + * Gives objective bonus on exploding the bomb instead of planting + * 0 - bonus on planting + * 1 - bonus on exploding + */ + "ObjectiveBonusExplode" "0" + + /* Remove objectives from map. 0 = Disabled, 1 = BOMB, 2 = HOSTAGE, 3 = BOTH*/ + "RemoveObjectives" "3" + + /* ----- [1.4. handicap] ----- */ + + /** + * Maximum level that handicap can give. + * 0 - Disable restriction + * 1..N - Max level + */ + "MaxHandicapLevel" "0" + + /* Substract handicap level by this value */ + "HandicapLevelSubstract" "1" + + /** + * Gives joining players the avg/min level of all other players when they join late. + * 0 - Disable + * 1 - Avg level + * 2 - Min level + */ + "HandicapMode" "2" + + /** + * Allow players in the top rank to receive a handicap with the rest of the players. + * + * Handicap must also be turned on above for this to work. + * See also "HandicapTopRank" to set rank limit for tp rank. + * + * 0 - Do not give handicap to the top rank players. + * 1 - Give handicap to all players. + */ + "TopRankHandicap" "1" + + /** + * Gives handicap level automaticaly every defined number of seconds. + * This only works for players that is on very minimum level from + * all the players. + * Handicap must also be turned on for this to work. + */ + "HandicapUpdate" "0" + + /** + * Give handicap not more then given number of times per map. + * 0 - disabled + */ + "HandicapTimesPerMap" "0" + + /** + * Do not give handicap to the top rank players. + * + * See also "TopRankHandicap" to allow all players to receive handicap. + * + * 0 - Give handicap to all players. + * N - Do not give handicap for the first N players. + */ + "HandicapTopRank" "10" + + /** + * Use spectator's levels to calculate handicap level. + * + * 0 - Handicap does not count levels of spectators. + * 1 - Handicap counts levels of spectators. + */ + "HandicapUseSpectators" "0" + + /* ----- [1.5. equip] ----- */ + + /* Auto reload current level weapon on kill */ + "ReloadWeapon" "1" + + /* Give player armor on spawn */ + "ArmorKevlar" "1" + "ArmorHelmet" "1" + + /* Remove additional ammo in bonus weapon on the nade level */ + "RemoveBonusWeaponAmmo" "1" + + /** + * If remove additional ammo in bonus weapon on the nade level is enabled, then give that bullets count. + * + * 0 - default clip size + * 1-N - number of bullets + */ + "BonusWeaponAmmo" "50" + + /** + * This gives the player a weapon with 50 bullets on nade level. + * Example: + * "NadeBonus" "glock" - gives glock + * "NadeBonus" "deagle" - gives deagle + * "NadeBonus" "" - feature disabled + */ + "NadeBonus" "" + + /* Gives a smoke grenade on nade level */ + "NadeSmoke" "0" + + /* Gives a Flash grenade on nade level */ + "NadeFlash" "0" + + /* Gives a smoke grenade on knife level */ + "KnifeSmoke" "0" + + /* Gives a Flash grenade on knife level */ + "KnifeFlash" "0" + + /** + * Gives an extra hegrenade to the player if they get a kill + * + * 0 - Disable + * 1 - Enable + * 2 - Enable only for knife kills + */ + "ExtraNade" "0" + + /* Gives unlimited hegrenades to the player if he is on nage level */ + "UnlimitedNades" "0" + + /** + * Enable UnlimitedNades depending on the number of players in team. + * + * If UnlimitedNades is off and the number of players in one team less or + * equal to UnlimitedNadesMinPlayers then enable UnlimitedNades. + * When it will be more players on both teams, turn UnlimitedNades back to off. + * + * 0 - Disable + * 1 and above - Minimum number of players in each team for UnlimitedNames to be on. + */ + "UnlimitedNadesMinPlayers" "1" + + /** + * Number of nades on the nade level. + * + * This option is disabled + * if less then 2. + */ + "NumberOfNades" "0" + + /* ----- [1.6. multi level] ----- */ + + /* Multi Level Bonus */ + "MultiLevelBonus" "0" + + /* Enable God Mode when multi leveled */ + "MultiLevelBonusGodMode" "1" + + /** + * Custom speed and gravity value multiplier for multi level bonus. + * 0 - Disabled + */ + "MultiLevelBonusGravity" "0.5" + "MultiLevelBonusSpeed" "1.5" + + /* Miltilevel visual effect */ + "MultiLevelEffect" "0" + + /* How much levels is needed to get bonus */ + "MultiLevelAmount" "3" + + /** + * Type of the multi level effect. + * + * 1 - Old effect. + * 2 - New effect (default). + */ + "MultilevelEffectType" "2" + + /* ----- [1.7. warmup] ----- */ + + /* Enables Warmup Round*/ + "WarmupEnabled" "1" + + /* Warmup time length */ + "WarmupTimeLength" "60" + + /** + * Give random weapon on warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + * + * 0 - Disable + * 1 - Random weapon every map + * 2 - Random weapon every round + * 3 - Random weapon every spawn + */ + "WarmupRandomWeaponMode" "0" + + /** + * Gives unlimited hegrenades to the player if warmup is enabled. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupNades" "1" + + /** + * Weapon for warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupWeapon" "" + + /* ===== [2. GUNGAME TK CONFIG] ===== */ + + /** + * How much levels to loose after TK + * 0 - Disable + * 1..N - Levels to loose + */ + "TkLooseLevel" "0" + + /* ===== [3. GUNGAME AFK CONFIG] ===== */ + + /* Enables or disables built in Afk management system */ + "AfkManagement" "1" + + /* Kick player on x number of afk deaths. */ + "AfkDeaths" "5" + + /** + * What action to deal with the player when the maximum is reach? + * 0 = Nothing, 1 = Kick, 2 = Move to spectate, + */ + "AfkAction" "2" + + /* Reload current weapon on afk kill. */ + "AfkReload" "0" + + /* ===== [4. GUNGAME STATS CONFIG] ===== */ + + /** + * Prune player from player win database after numbers of days if they + * havn't been in the server in awhile. This occur during map change. + * It it recommended that you set a value to this setting. Over time as + * the player win database get filled up. It can cause long map changes. + * 0 = off otherwise the value is the number of days. + */ + "Prune" "366" + + /* ===== [5. GUNGAME DISPLAY WINNER CONFIG] ===== */ + + /* Display winner in MOTD window. */ + "DisplayWinnerMotd" "0" + + /* URL to display in MOTD window. */ + "DisplayWinnerUrl" "http://otstrel.ru/gg5_win.php" + + /* Show player rank on win in chat */ + "ShowPlayerRankOnWin" "1" + + /** + * If player wins on bot, then dont add win in stats. + * + * 0 - Add win into stats. + * 1 - Don't add win into stats. + */ + "DontAddWinsOnBot" "0" + + /* ===== [6. GUNGAME BOTS CONFIG] ===== */ + + /** + * Dont use bots levels for handicap calculation. + * Dont give handicap level to bots too. + */ + "HandicapSkipBots" "0" + + /* Can bots win the game otherwise when they reach the last weapon and nothing will happen */ + "BotsCanWinGame" "0" + + /* Allow level up by killing a bot with knife */ + "AllowLevelUpByKnifeBot" "0" + + /* Allow level up by killing a bot with hegrenade */ + "AllowLevelUpByExplodeBot" "0" + + /* Allow level up by killing a bot with knife if there is no other human */ + "AllowLevelUpByKnifeBotIfNoHuman" "1" + + /* Allow level up by killing a bot with hegrenade if there is no other human */ + "AllowLevelUpByExplodeBotIfNoHuman" "1" + } + + "Sounds" + { + "IntroSound" "gungame/gungame2.mp3" + "KnifeLevel" "gungame/knife_level.mp3" + "NadeLevel" "gungame/nade_level.mp3" + "LevelSteal" "gungame/smb3_1-up.mp3" + "LevelUp" "gungame/smb3_powerup.mp3" + "LevelDown" "gungame/smb3_powerdown.mp3" + "Triple" "gungame/smb_star.mp3" + "Autoff" "gungame/smb_warning2.mp3" + "MultiKill" "gungame/multikill.mp3" // (�) VALVE + /* Put each song filename in this list seperated by commas */ + "Winner" "gungame/winner.mp3" // (�) VALVE + "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE + } +} \ No newline at end of file diff --git a/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt b/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt new file mode 100644 index 0000000..a634045 --- /dev/null +++ b/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt @@ -0,0 +1,107 @@ +"GunGame.Weapon" +{ + "WeaponOrder" + { + /** + * Weapon Choices: + * There are a total of 64 levels by default. (To change this value you can edit the gungame_const.inc + * to change the maximum allowed level of the game by changing the define MAX_LEVEL) + * + * There are a total of 25 usable killing weapons for GunGame. + * By default weapon order only 23 levels and uses 23 out of 25 of the usable killing weapons. + * + * WARNING: + * DO NOT SKIP LEVELS in any config for WeaponOrder. + * ie .. Only have level 1 to 3 and skip 4 and use 5 to level 23. + * DO NOT SKIP LEVELS + * + * HandGuns: + * glock, usp, p228, deagle, fiveseven, elite + * + * Shotguns: + * m3, xm1014 + * + * Sub Machine Guns: + * tmp, mac10, mp5navy, ump45, p90 + * + * Rifles: + * galil, famas, ak47, scout, m4a1, sg552, + * aug, m249, awp + * + * Automatic Rifles: + * sg550, g3sg1 + * + * Machine Gun: + * m249 + * + * Other: + * knife, hegrenade + */ + + "1" "glock" + "2" "usp" + "3" "p228" + "4" "deagle" + "5" "fiveseven" + "6" "elite" + "7" "m3" + "8" "xm1014" + "9" "tmp" + "10" "mac10" + "11" "mp5navy" + "12" "ump45" + "13" "p90" + "14" "famas" + "15" "ak47" + "16" "m4a1" + "17" "sg552" + "18" "aug" + "19" "m249" + "20" "scout" + "21" "awp" + "22" "hegrenade" + "23" "knife" + + /** + * If RandomWeaponOrder is enabled, keep this levels unchanged. + * Use comma as a delimiter, do not use whitespace characters - only digits are allowed. + * Please keep this config line after levels list and before RandomWeaponOrder. + * + * "22,23" - keep knife and nade levels on defined levels + * "23" - keep knife level on defined level + * "" - randomize all levels + */ + "RandomWeaponReserveLevels" "" + + /** + * This will take the weapons in the WeaponOrder and randomize all the weapons order. + * Please keep this config line after levels list and after RandomWeaponReserveLevels. + */ + "RandomWeaponOrder" "0" + } + + "MultipleKillsPerLevel" + { + /** + * This is for custom kills per level will override default (MinKillsPerWeapon). + * Leave value at 0 if you do not want to override the default value. + * + * Example: + * + * For level 1 they must get 10 kills before they can level up. + * "1" "10" + * "2" "5" + * and so on. + * + * Or you can set kills per level for a perticular level. + * "1" "10" + * "3" "5" + * "5" "2" + * etc. + * + * Kills will count across all rounds so that you don't have to get them in one round. + * + * + */ + } +} diff --git a/css-gungame/configure-gungame.sh b/css-gungame/configure-gungame.sh new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/css-gungame/configure-gungame.sh @@ -0,0 +1 @@ +#!/bin/sh diff --git a/css-gungame/configure.sh b/css-gungame/configure.sh index 59eb8af..c54185a 100755 --- a/css-gungame/configure.sh +++ b/css-gungame/configure.sh @@ -1,7 +1,6 @@ #!/bin/sh ./configure-base.sh - -echo "mp_ignore_round_win_conditions 1" >> /steam/css/cstrike/cfg/server.cfg - -# echo sm_mapvote_endvote > /steam/css/cstrike/cfg/gungame/css/gungame.mapvote.cfg +./configure-metamod.sh +./configure-deathmatch.sh +./configure-gungame.sh diff --git a/css-gungame/download.sh b/css-gungame/download.sh index 9587902..42e0305 100755 --- a/css-gungame/download.sh +++ b/css-gungame/download.sh @@ -2,8 +2,5 @@ # https://forums.alliedmods.net/showthread.php?t=93977 curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' -unzip -o sm_gungame.zip - -# https://forums.alliedmods.net/showthread.php?t=103242 -curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' -unzip -o sm_ggdm-1.8.0.zip +unzip -o sm_gungame.zip -d cstrike +rm -f sm_gungame.zip diff --git a/css-hideandseek/.dockerignore b/css-hideandseek/.dockerignore new file mode 100644 index 0000000..53c75f2 --- /dev/null +++ b/css-hideandseek/.dockerignore @@ -0,0 +1,3 @@ +.gitignore +README.md +Dockerfile diff --git a/css-hideandseek/Dockerfile b/css-hideandseek/Dockerfile index 0e876aa..4ad05f1 100644 --- a/css-hideandseek/Dockerfile +++ b/css-hideandseek/Dockerfile @@ -4,9 +4,10 @@ USER steam WORKDIR /steam/css/cstrike -COPY download.sh . -RUN ./download.sh && \ - unzip sm_hideandseek.zip +COPY --chown=steam download.sh \ + configure.sh \ + ./ +RUN ./download.sh WORKDIR /steam/css diff --git a/css-hideandseek/configure.sh b/css-hideandseek/configure.sh new file mode 100755 index 0000000..edbf724 --- /dev/null +++ b/css-hideandseek/configure.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh diff --git a/css-hideandseek/download.sh b/css-hideandseek/download.sh index 7b3f968..4862296 100755 --- a/css-hideandseek/download.sh +++ b/css-hideandseek/download.sh @@ -3,3 +3,5 @@ # [CS:S] Hide and seek # https://forums.alliedmods.net/showthread.php?p=1158242 curl -o sm_hideandseek.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=91862&d=1315059433' +unzip sm_hideandseek.zip +rm -f sm_hideandseek.zip diff --git a/css-metamod/Dockerfile b/css-metamod/Dockerfile index 58d799c..2d638b4 100644 --- a/css-metamod/Dockerfile +++ b/css-metamod/Dockerfile @@ -1,20 +1,22 @@ FROM css +ENV TEMP_DIR=/tmp/css/ + WORKDIR /steam/css/ USER steam -COPY download.sh . -RUN ./download.sh -RUN tar -xf mm*.tar.gz -C cstrike/ && \ - tar -xf sourcemod*.tar.gz -C cstrike/ && \ - mv cstrike/addons/sourcemod/plugins/disabled/mapchooser.smx cstrike/addons/sourcemod/plugins/mapchooser.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/nominations.smx cstrike/addons/sourcemod/plugins/nominations.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/randomcycle.smx cstrike/addons/sourcemod/plugins/randomcycle.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/rockthevote.smx cstrike/addons/sourcemod/plugins/rockthevote.smx +COPY --chown=steam download.sh ./ +RUN ./download.sh -COPY metamod.vdf cstrike/ +COPY --chown=steam \ + metamod.vdf \ + ./cstrike/ -RUN echo '"$FULL_ADMINS" "@Full Admins"' > cstrike/addons/sourcemod/configs/admins_simple.ini +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-metamod.sh \ + ./ ENV SV_HOSTNAME="Counterstrike Source (MetaMod)" diff --git a/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg b/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg new file mode 100644 index 0000000..a45b23b --- /dev/null +++ b/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg @@ -0,0 +1,10 @@ +Overrides +{ + "sm_mapvote" "z" + "sm_votemaps" "z" + "sm_extend" "z" + "sm_nextmap" "z" + "sm_rtv" "z" + "sm_nominate" "z" + "sm_listmaps" "z" +} diff --git a/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt b/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt new file mode 100644 index 0000000..1c3b671 --- /dev/null +++ b/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt @@ -0,0 +1,18 @@ +cs_assault +cs_compound +cs_estate +cs_havana +cs_italy +cs_militia +cs_office +de_aztec +de_cbble +de_chateau +de_dust2 +de_dust +de_inferno +de_nuke +de_piranesi +de_port +de_prodigy +de_train diff --git a/css-metamod/configure-metamod.sh b/css-metamod/configure-metamod.sh new file mode 100755 index 0000000..97b0da9 --- /dev/null +++ b/css-metamod/configure-metamod.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./configure-base.sh + +echo '"$FULL_ADMINS" "@Full Admins"' > cstrike/addons/sourcemod/configs/admins_simple.ini diff --git a/css-metamod/configure.sh b/css-metamod/configure.sh new file mode 100755 index 0000000..edbf724 --- /dev/null +++ b/css-metamod/configure.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh diff --git a/css-metamod/download.sh b/css-metamod/download.sh index 5b46b75..2b4ff8f 100755 --- a/css-metamod/download.sh +++ b/css-metamod/download.sh @@ -1,13 +1,31 @@ #!/bin/bash +set -e + +source /steam/scripts/zip-utils.sh + MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" +tar -xf mm*.tar.gz -C cstrike/ +rm -f mm*.tar.gz SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +tar -xf sourcemod*.tar.gz -C cstrike/ +mv cstrike/addons/sourcemod/plugins/disabled/randomcycle.smx cstrike/addons/sourcemod/plugins/randomcycle.smx +rm -f sourcemod*.tar.gz + +# MapChooser Extended +# https://forums.alliedmods.net/showthread.php?t=156974?t=156974 +curl -o mapchooser_extended_1.10.2.zip "https://forums.alliedmods.net/attachment.php?attachmentid=130293&d=1391630113" +unzipAndMoveToDir mapchooser_extended_1.10.2.zip /steam/css/cstrike/ +mv cstrike/addons/sourcemod/plugins/disabled/rockthevote_extended.smx cstrike/addons/sourcemod/plugins/rockthevote_extended.smx +mv cstrike/addons/sourcemod/plugins/disabled/mapchooser_extended_sounds.smx cstrike/addons/sourcemod/plugins/mapchooser_extended_sounds.smx +mv cstrike/addons/sourcemod/plugins/disabled/nominations_extended.smx cstrike/addons/sourcemod/plugins/nominations_extended.smx +rm -f mapchooser_extended_1.10.2.zip diff --git a/css/Dockerfile b/css/Dockerfile index a8b9ba3..93c6278 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -11,9 +11,15 @@ USER steam RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit ARG CACHE_DATE -RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit \ + && rm -f /steam/css/cstrike/maps/test_hardware.bsp \ + && rm -f /steam/css/cstrike/maps/test_speakers.bsp -COPY configure.sh \ +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-base.sh \ + generate-mapcycle.sh \ start.sh \ ./ diff --git a/css/config/cstrike/cfg/motd.txt b/css/config/cstrike/cfg/motd.txt new file mode 100644 index 0000000..76a3ad6 --- /dev/null +++ b/css/config/cstrike/cfg/motd.txt @@ -0,0 +1,40 @@ + + + +Cstrike MOTD + + + +
+You are playing Counter-Strike: Source
+Visit the official CS web site @
+www.counter-strike.net
+Visit Counter-Strike.net
+
+ \ No newline at end of file diff --git a/css/config/cstrike/cfg/motd_text.txt b/css/config/cstrike/cfg/motd_text.txt new file mode 100644 index 0000000..4bfe4c2 --- /dev/null +++ b/css/config/cstrike/cfg/motd_text.txt @@ -0,0 +1,3 @@ +You are playing Counter-Strike: Source +Visit the official CS web site @ +www.counter-strike.net \ No newline at end of file diff --git a/css/config/cstrike/maps/copy-maps-here b/css/config/cstrike/maps/copy-maps-here new file mode 100644 index 0000000..e69de29 diff --git a/css/configure-base.sh b/css/configure-base.sh new file mode 100755 index 0000000..a456114 --- /dev/null +++ b/css/configure-base.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +# Config file +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Base)" + +# mp config +[[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 +[[ -z $MP_MAXROUNDS ]] && MP_MAXROUNDS=15 +[[ -z $MP_ROUNDTIME ]] && MP_ROUNDTIME=3.5 +[[ -z $MP_AUTOTEAMBALANCE ]] && MP_AUTOTEAMBALANCE=0 + +# bot config +# how many bots? +[[ -z $BOT_QUOTA ]] && BOT_QUOTA=0 + +# fill = If a player joins, the Bot will be kicked +# normal = If a player joins, the Bot won´t be kicked +[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=fill + +# bots populate after a player joins the server +# 0 = bots always present +# 1 = bots join after humans +[[ -z $BOT_JOIN_AFTER_PLAYER ]] && BOT_JOIN_AFTER_PLAYER=1 + +# 0 = easy +# 1 = normal +# 2 = hard +# 3 = extreme +[[ -z $BOT_DIFFICULTY ]] && BOT_DIFFICULTY=2 + +[[ -z $BOT_PREFIX ]] && BOT_PREFIX=[BOT] + +# Bots defuse the bombs etc... +# 0 = Bots allowed +# 1 = Humans only +[[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 + +# kick bot when slots fill +# 0 = don't kick the bot +# 1 = kick the bot +[[ -z $BOT_AUTO_VACATE ]] && BOT_AUTO_VACATE=1 + +# on, off, radio, minimal, normal +[[ -z $BOT_CHATTER ]] && BOT_CHATTER=minimal + +# bot weapon set +[[ -z $BOT_ALLOW_GRENADES ]] && BOT_ALLOW_GRENADES=1 +[[ -z $BOT_ALLOW_PISTOLS ]] && BOT_ALLOW_PISTOLS=1 +[[ -z $BOT_ALLOW_RIFLES ]] && BOT_ALLOW_RIFLES=1 +[[ -z $BOT_ALLOW_ROGUES ]] && BOT_ALLOW_ROGUES=1 +[[ -z $BOT_ALLOW_SHOTGUNS ]] && BOT_ALLOW_SHOTGUNS=1 +[[ -z $BOT_ALLOW_SNIPERS ]] && BOT_ALLOW_SNIPERS=1 +[[ -z $BOT_ALLOW_MACHINE_GUNS ]] && BOT_ALLOW_MACHINE_GUNS=1 +[[ -z $BOT_ALLOW_SUB_MACHINE_GUNS ]] && BOT_ALLOW_SUB_MACHINE_GUNS=1 + +# Create config file +cat </steam/css/cstrike/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +mp_friendlyfire $MP_FRIENDLYFIRE +mp_timelimit $MP_TIMELIMIT +mp_maxrounds $MP_MAXROUNDS +mp_roundtime $MP_ROUNDTIME +mp_autoteambalance $MP_AUTOTEAMBALANCE +bot_quota $BOT_QUOTA +bot_quota_mode $BOT_QUOTA_MODE +bot_join_after_player $BOT_JOIN_AFTER_PLAYER +bot_difficulty $BOT_DIFFICULTY +bot_prefix $BOT_PREFIX +bot_defer_to_human $BOT_DEFER_TO_HUMAN +bot_auto_vacate $BOT_AUTO_VACATE +bot_chatter $BOT_CHATTER +bot_allow_grenades $BOT_ALLOW_GRENADES +bot_allow_pistols $BOT_ALLOW_PISTOLS +bot_allow_rifles $BOT_ALLOW_RIFLES +bot_allow_rogues $BOT_ALLOW_ROGUES +bot_allow_shotguns $BOT_ALLOW_SHOTGUNS +bot_allow_snipers $BOT_ALLOW_SNIPERS +bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS +bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS +EOF + +./generate-mapcycle.sh diff --git a/css/configure.sh b/css/configure.sh index b6c9727..3658d33 100755 --- a/css/configure.sh +++ b/css/configure.sh @@ -1,84 +1,3 @@ -#!/bin/bash +#!/bin/sh -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Base)" - -# mp config -[[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 -[[ -z $MP_MAXROUNDS ]] && MP_MAXROUNDS=15 -[[ -z $MP_ROUNDTIME ]] && MP_ROUNDTIME=3.5 -[[ -z $MP_AUTOTEAMBALANCE ]] && MP_AUTOTEAMBALANCE=0 - -# bot config -# how many bots? -[[ -z $BOT_QUOTA ]] && BOT_QUOTA=0 - -# fill = If a player joins, the Bot will be kicked -# normal = If a player joins, the Bot won´t be kicked -[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=fill - -# bots populate after a player joins the server -# 0 = bots always present -# 1 = bots join after humans -[[ -z $BOT_JOIN_AFTER_PLAYER ]] && BOT_JOIN_AFTER_PLAYER=1 - -# 0 = easy -# 1 = normal -# 2 = hard -# 3 = extreme -[[ -z $BOT_DIFFICULTY ]] && BOT_DIFFICULTY=2 - -[[ -z $BOT_PREFIX ]] && BOT_PREFIX=[BOT] - -# Bots defuse the bombs etc... -# 0 = Bots allowed -# 1 = Humans only -[[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 - -# kick bot when slots fill -# 0 = don't kick the bot -# 1 = kick the bot -[[ -z $BOT_AUTO_VACATE ]] && BOT_AUTO_VACATE=1 - -# on, off, radio, minimal, normal -[[ -z $BOT_CHATTER ]] && BOT_CHATTER=minimal - -# bot weapon set -[[ -z $BOT_ALLOW_GRENADES ]] && BOT_ALLOW_GRENADES=1 -[[ -z $BOT_ALLOW_PISTOLS ]] && BOT_ALLOW_PISTOLS=1 -[[ -z $BOT_ALLOW_RIFLES ]] && BOT_ALLOW_RIFLES=1 -[[ -z $BOT_ALLOW_ROGUES ]] && BOT_ALLOW_ROGUES=1 -[[ -z $BOT_ALLOW_SHOTGUNS ]] && BOT_ALLOW_SHOTGUNS=1 -[[ -z $BOT_ALLOW_SNIPERS ]] && BOT_ALLOW_SNIPERS=1 -[[ -z $BOT_ALLOW_MACHINE_GUNS ]] && BOT_ALLOW_MACHINE_GUNS=1 -[[ -z $BOT_ALLOW_SUB_MACHINE_GUNS ]] && BOT_ALLOW_SUB_MACHINE_GUNS=1 - -# Create config file -cat </steam/css/cstrike/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -mp_friendlyfire $MP_FRIENDLYFIRE -mp_timelimit $MP_TIMELIMIT -mp_maxrounds $MP_MAXROUNDS -mp_roundtime $MP_ROUNDTIME -mp_autoteambalance $MP_AUTOTEAMBALANCE -bot_quota $BOT_QUOTA -bot_quota_mode $BOT_QUOTA_MODE -bot_join_after_player $BOT_JOIN_AFTER_PLAYER -bot_difficulty $BOT_DIFFICULTY -bot_prefix $BOT_PREFIX -bot_defer_to_human $BOT_DEFER_TO_HUMAN -bot_auto_vacate $BOT_AUTO_VACATE -bot_chatter $BOT_CHATTER -bot_allow_grenades $BOT_ALLOW_GRENADES -bot_allow_pistols $BOT_ALLOW_PISTOLS -bot_allow_rifles $BOT_ALLOW_RIFLES -bot_allow_rogues $BOT_ALLOW_ROGUES -bot_allow_shotguns $BOT_ALLOW_SHOTGUNS -bot_allow_snipers $BOT_ALLOW_SNIPERS -bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS -bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS -EOF +./configure-base.sh diff --git a/css/generate-mapcycle.sh b/css/generate-mapcycle.sh new file mode 100755 index 0000000..cc65633 --- /dev/null +++ b/css/generate-mapcycle.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Define the directory containing the maps +MAP_DIR="cstrike/maps" + +# Define the output file +OUTPUT_FILE="cstrike/cfg/mapcycle.txt" + +if [ -f "$OUTPUT_FILE" ]; then + echo "mapcycle.txt detected, no generation required." + exit 0 +fi + +# Initialize the randomize flag to false +RANDOMIZE=${RANDOMIZE_MAP_ORDER:-false} + +# Create or clear the mapcycle.txt file +> "$OUTPUT_FILE" + +# Collect all map names into an array +map_list=() +for map in "$MAP_DIR"/*.bsp; do + map_name=$(basename "$map" .bsp) + map_list+=("$map_name") +done + +# Randomize the map list if the -r flag is set +if [ "$RANDOMIZE" = true ]; then + map_list=($(shuf -e "${map_list[@]}")) +fi + +# Write the map names to the mapcycle.txt file +for map_name in "${map_list[@]}"; do + echo "$map_name" >> "$OUTPUT_FILE" +done + +# Output success message +echo "mapcycle.txt has been generated with $(wc -l < "$OUTPUT_FILE") maps."