Closed marlub closed 4 months ago
Hello @marlub - That is because the SED uses the delimiter / for Regex. See here: https://github.com/jammsen/docker-palworld-dedicated-server/blob/develop/includes/config.sh#L252
If if would go for # or another character the issue of someone else would be "Cant use # in Servername". One character it has to be and i went with "/". You could try to use escaping in your Servername variable meaning using instead of / the use of \/
Hope that helps.
Hey @jammsen, thanks for your clarification. GitHub does not correctly print the backslash for me, which I think you wrote. Escaping myself works fine.
Little bit odd, as this worked yesterday with the latest image from before 13.02 04:34 CET.
Maybe I am wrong but a character like ; or ° sounds less conflict likely for me than /. On the other hand, slash is the common delimiter.
Another approach is to escape the delimiter systematically. You could do something like this for example:
SERVER_NAME=$(echo ${SERVER_NAME} | sed -e "s#/#\\\/#g")
sed -E -i "s/ServerName=\"[^\"]*\"/ServerName=\"$SERVER_NAME\"/" "$GAME_SETTINGS_FILE"
I like having /
as the delimiter, but thanks input, glad that escaping works.
If you like this project, please consider giving this repo and the Docker-Hub-Repo a Star.
Have you read the Important information text above
Current behavior
Using this .env entry as example
SERVER_NAME="[EU/DE]"
crashes the container with this message:As soon as I change the server name to this
SERVER_NAME="[EU|DE]"
it works.Desired behavior
I think common characters like slashes should work on server name env variable.
Links to screenshots
No response
To Reproduce
Steps to reproduce the behavior:
Software setup
Hardware setup
Additional context
No response