-
Notifications
You must be signed in to change notification settings - Fork 103
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 bootstrap to vanilla; enables use of env variables (a la tshock image) #68
base: master
Are you sure you want to change the base?
Conversation
… default world loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to be honest, in that i've spent far less time learning the vanilla server switches as I have spent maintaining the TShock version over the years. I have some concerns with how this bootstrapper is defined, and the world argument is always present.
vanilla/bootstrap.sh
Outdated
#!/usr/bin/env bash | ||
|
||
if [ -z "$WORLD_FILENAME" ]; then | ||
/terraria-server/TerrariaServer -world $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I havent tried to execute this code yet, but if I am reading this correctly, if the $WORLD_FILENAME
is null, then why would we specify the world flag without a value?
if [ -z "$WORLD_FILENAME" ]; then | ||
/terraria-server/TerrariaServer -world $@ | ||
else | ||
/terraria-server/TerrariaServer -world $CONFIGPATH/$WORLD_FILENAME $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intent is that worlds are volumed in the /root/.local/share/Terraria/Worlds
path where the executable defaults saving world files. Is the intent that the configuration data lives side-by-side with the world file on the host machine?
Making this change would force users through the bootstrapper. If they do not have a world file how would that work? They would have to volume in the directory to save the data and then copy the data to where they store their config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! You're right, I shouldn't have the "-world" on line 4. I can fix that.
The goal was to make it so that the bootstrapper is a pass-through if WORLD_FILENAME is not defined. I.e., if they do not define WORLD_FILENAME, it should just call "/terraria-server/TerrariaServer $@" (which should still work if the users append "-world somefile.wld").
With respect to the CONFIGPATH, this is really meant to sync up with the tshock version (which defaults to the world path - "ENV CONFIGPATH=/root/.local/share/Terraria/Worlds"). I actually moved over from the tshock version to vanilla (due to the most recent Terraria update), so my goal was to sync up with that. Alternatively, I could add another "WORLDPATH" variable if we wanted to separate the world and configuration paths.
The overall goal was to try avoiding the necessity of hardcoding world file paths into the entrypoint / command, but to do so by using an abstraction that might be helpful in the future (by adding a thin wrapper around the vanilla server launcher).
Fixed bug when no WORLD_FILENAME is provided
@ryansheehan, just checking on this. :) The "-world" error should be fixed now. |
No description provided.