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

Add env to toggle to automatically generate palworldsettings #342

Merged
merged 6 commits into from
Feb 11, 2024

Conversation

MSpreckels
Copy link
Contributor

@MSpreckels MSpreckels commented Feb 9, 2024

Context

resolves #326

Choices

Add an env var which is false by default that decides if the PalWorldSettings.ini is compiled from env vars automatically

Test instructions

Test Case: New Server, no automatic settings

  1. Set DISABLE_GENERATE_SETTINGS to true
  2. Start the server
  3. On the server run cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  4. Verify that all values are default

Test Case: Existing Server, no automatic settings

  1. Set DISABLE_GENERATE_SETTINGS to true
  2. Modify or set SERVER_NAME environment variable
  3. Start the server
  4. On the server run cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  5. Verify that all values are still the same to prior launch and SERVER_NAME was not applied

Test Case: New Server, automatic settings

  1. Set DISABLE_GENERATE_SETTINGS to false (or remove it entirely)
  2. Start the server
  3. On the server run cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  4. Verify that all values are as they were set as environment variables

Test Case: Existing Server, automatic settings

  1. Set DISABLE_GENERATE_SETTINGS to false (or remove it entirely)
  2. Start the server
  3. On the server run cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  4. Verify that all values are as they were set as environment variables

Checklist before requesting a review

  • I have performed a self-review of my code
  • I've added documentation about this change to the README.
  • I've not introduced breaking changes.

@MSpreckels MSpreckels marked this pull request as ready for review February 9, 2024 16:13
scripts/start.sh Outdated Show resolved Hide resolved
Copy link
Owner

@thijsvanloef thijsvanloef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, and works great, the only thing I would still like is a small printf that notifies the users that the ENV vars will not be applied as the DISABLE_GENERATE_SETTINGS is true

Copy link
Owner

@thijsvanloef thijsvanloef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@thijsvanloef thijsvanloef merged commit 21d7447 into thijsvanloef:main Feb 11, 2024
6 of 7 checks passed
MusclePr pushed a commit to MusclePr/palworld-server-docker that referenced this pull request Jun 19, 2024
…ettings

Add env to toggle to automatically generate palworldsettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create switch to allow manual configuration of .ini files
3 participants