-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
updating STARTCOMMAND to array with += syntax and allowing spaces in … #124
updating STARTCOMMAND to array with += syntax and allowing spaces in … #124
Conversation
…server name and passwords
Brilliant! |
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.
@clarkent86 Thank you for creating this PR, however I did find an issue. Changing this to an array while not changing the way the startcommand gets expanded, does not work.
As shellcheck gives the following error on su steam -c "${STARTCOMMAND}"
:
Expanding an array without an index only gives the first element.shellcheckSC2128
Which I could confirm when running it myself:
palworld-server | *****CHECKING FOR EXISTING CONFIG*****
palworld-server | RCON_ENABLED=true
palworld-server | RCON_PORT=25575
palworld-server | ./PalServer.sh
palworld-server | Shutdown handler: initalize.
palworld-server | Increasing per-process limit of core file size to infinity.
palworld-server | [S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
palworld-server | CAppInfoCacheReadFromDiskThread took 1 milliseconds to initialize
palworld-server | Setting breakpad minidump AppID = 2394010
palworld-server | [S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded.
palworld-server | [S_API FAIL] Tried to access Steam interface SteamFriends017 before SteamAPI_Init succeeded.
palworld-server | [S_API FAIL] Tried to access Steam interface STEAMAPPS_INTERFACE_VERSION008 before SteamAPI_Init succeeded.
palworld-server | [S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.
Only ./PalServer.sh gets called with no parameters
@thijsvanloef Apologies! I was testing with a local script and forgot to expand the array correctly when applying it to this code base. I should've noticed with the other comment! Should be fixed now, can you try again? |
@Dashboy1998 thanks! It looks like I missed the echo command as well, updated. Also, expanding with the |
@clarkent86 Awesome work, ready to merge :) |
Needed to revert the changes, I've done some more testing and it seems like it won't start:
|
@clarkent86 ☝️ |
Got it. Seems like there's something unexpected happening, I'll need to figure out how to source a custom image on my NAS. Sorry about that. |
@clarkent86 No worries, shit happens, nothing was deployed 🙂 |
Got it working and fully tested now instead of just printing the startcmd in a script, PR incoming! |
updating STARTCOMMAND to array with += syntax and allowing spaces in …
Updating to using array for STARTCOMMAND due to issues that
su steam -c "${STARTCOMMAND}"
can have with escaped quotes and spaces, also this will allow for spaces in server names and passwordsContext
Allow users to use spaces in certain environment variables
Choices
Test instructions
Checklist before requesting a review
there is no mention spaces aren't supported, so this will just be helpful overall