Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov committed Apr 5, 2024
1 parent a80b26e commit 12257d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/.teamplate-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 12257d2

Please sign in to comment.