Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: ServerTag #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The server settings can be changed by opening the `docker-compose.yaml` file. Se
| Setting name | Used for | Default value |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| CFG_SERVER_NAME | Setting the server name that is displayed in the server list. | Unnamed Island |
| CFG_SERVER_TAG | It's the tag that allows for easier search of the server. Please don't use your the word OFFICIAL on it. We want players to clearly know if they are joining a server that is hosted by other players. And only place one tag. | Default |
| CFG_MAX_PLAYERS | The maximum amount of players the server will allow at the same time. | 32 |
| CFG_SERVER_MOTD | A Message Of The Day that will be displayed to the player. | Welcome to Longvinter Island! |
| CFG_PASSWORD | Use this setting to require a password to join the server. | _(empty)_ |
Expand All @@ -99,6 +100,7 @@ With the default values above, the environment part of the `docker-compose.yaml`
```shell
environment:
CFG_SERVER_NAME: "Unnamed Island"
CFG_SERVER_TAG: "Default"
CFG_MAX_PLAYERS: "32"
CFG_SERVER_MOTD: "Welcome to Longvinter Island!"
CFG_PASSWORD: ""
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- "27016:27016/udp"
environment:
CFG_SERVER_NAME: "Unnamed Island"
CFG_SERVER_TAG: "Default"
CFG_MAX_PLAYERS: "32"
CFG_SERVER_MOTD: "Welcome to Longvinter Island!"
CFG_PASSWORD: ""
Expand Down
3 changes: 3 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SERVER_CONFIG_PATH="Longvinter/Saved/Config/LinuxServer/Game.ini"

# Default server settings (do not edit these, use environment variables to override)
DEFAULT_CFG_SERVER_NAME="Unnamed Island"
DEFAULT_CFG_SERVER_TAG="Default"
DEFAULT_CFG_MAX_PLAYERS=32
DEFAULT_CFG_SERVER_MOTD="Welcome to Longvinter Island!"
DEFAULT_CFG_PASSWORD=""
Expand Down Expand Up @@ -58,6 +59,7 @@ fi
echo "Preparing config variables..."
# Check if default config was overridden for one or more settings. If not use the defaults above.
if [ -z "$CFG_SERVER_NAME" ]; then CFG_SERVER_NAME=$DEFAULT_CFG_SERVER_NAME; fi
if [ -z "$CFG_SERVER_TAG" ]; then CFG_SERVER_TAG=$DEFAULT_CFG_SERVER_TAG; fi
if [ -z "$CFG_MAX_PLAYERS" ]; then CFG_MAX_PLAYERS=$DEFAULT_CFG_MAX_PLAYERS; fi
if [ -z "$CFG_SERVER_MOTD" ]; then CFG_SERVER_MOTD=$DEFAULT_CFG_SERVER_MOTD; fi
if [ -z "$CFG_PASSWORD" ]; then CFG_PASSWORD=$DEFAULT_CFG_PASSWORD; fi
Expand All @@ -74,6 +76,7 @@ echo "Setting config variables..."
# Note that the line directly below this one overwrites the file and its contents (using a single > instead of >>).
echo "[/Game/Blueprints/Server/GI_AdvancedSessions.GI_AdvancedSessions_C]" > $CONFIG_FILE_FULL_PATH
echo "ServerName=$CFG_SERVER_NAME" >> $CONFIG_FILE_FULL_PATH
echo "ServerTag=$CFG_SERVER_TAG" >> $CONFIG_FILE_FULL_PATH
echo "MaxPlayers=$CFG_MAX_PLAYERS" >> $CONFIG_FILE_FULL_PATH
echo "ServerMOTD=$CFG_SERVER_MOTD" >> $CONFIG_FILE_FULL_PATH
echo "Password=$CFG_PASSWORD" >> $CONFIG_FILE_FULL_PATH
Expand Down