ich777 / docker-steamcmd-server

Simple Dockerfile that installs steamcmd and a selected game server
119 stars 95 forks source link

feat(palworld) add ini-updater script #54

Closed xstar97 closed 6 months ago

xstar97 commented 6 months ago

The script makes it easier to update the ini file and keeps the code in 1 section. new variables can added and make this image more configurable without having to rewrite the sed everywhere.

the script should also be able to run within the image or scripts by running it like so.

set:

/opt/scripts/ini-updater.sh set "PublicIP" "${PUBLIC_IP}"
/opt/scripts/ini-updater.sh set "PublicPort" "8211"

get:

/opt/scripts/ini-updater.sh get "PublicIP"
/opt/scripts/ini-updater.sh get "PublicPort"

if the value contains special characters or spaces; quotes are added.

This will make containers easier to manage especially in kubernetes platform where our init containers dont need to be excessive rewriting the ini with sed.

ich777 commented 6 months ago

Thank you for the PR!

Sorry but I have to say that I won't accept that PR since my container is designed to only edit the ini file because I had terrible experience with editing it through variables and users will most certainly mess up.

You can look at this container over here from @jammsen which is designed for exactly what you want and he even has a compose example in there.

jammsen commented 6 months ago

Hey @ich777 thanks for letting me know!

Sure @xstar97 try mine and see if its more what you search for. https://github.com/jammsen/docker-palworld-dedicated-server (Hope that link is okay, if not please delete it @ich777 )