diff --git a/.github/.teamplate-README.md b/.github/.teamplate-README.md index dba5002..97d9686 100644 --- a/.github/.teamplate-README.md +++ b/.github/.teamplate-README.md @@ -26,11 +26,11 @@ docker run --rm -ti -p 27015:27015/udp $dockerUser/$mod:public ./hlds_run -game ### CMD The default `CMD` for an image is: ```Dockerfile -CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(head -n 1 ./${MOD}/mapcycle.txt)"]] +CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(grep -oE '^\\s*(\\w+)' ./${MOD}/mapcycle.txt | head -n 1 | xargs)"]] ``` > [!NOTE] -> `$(head -n 1 ./${MOD}/mapcycle.txt)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server. +> `$(grep -oE '^\\s*(\\w+)' ./${MOD}/mapcycle.txt | head -n 1 | xargs)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server. These values allow you to execute a string of initialization commands before calling the game binary.