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

Find a workaround for Ark config file #1235

Closed
UltimateByte opened this issue Jan 9, 2017 · 9 comments
Closed

Find a workaround for Ark config file #1235

UltimateByte opened this issue Jan 9, 2017 · 9 comments
Assignees
Labels
type: bug Something isn't working

Comments

@UltimateByte
Copy link
Contributor

The file is located in serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini
Problem is: the Saved directory doesn't exist until you start the server. So config file cannot be copied to this location.

So either it has to create parent directories first (then config file might be erased upon first start), or, it has to start/stop then replace default config file for LGSM one, then end the install process.

Or maybe you'll find a better solution? Discussion is open.

@UltimateByte UltimateByte added the type: bug Something isn't working label Jan 9, 2017
@braunsonm
Copy link
Contributor

You can simply call this function in install_config.sh before creating the default config file no?

# Checks if cfg dir exists, creates it if it doesn't
fn_check_cfgdir(){
if [ ! -d "${servercfgdir}" ]; then
echo "creating ${servercfgdir} config directory."
fn_script_log_info "creating ${servercfgdir} config directory."
mkdir -pv "${servercfgdir}"
fi
}

Many other servers use the same approach and my current pull request uses it and it works fine for Multi Theft Auto.

@UltimateByte
Copy link
Contributor Author

UltimateByte commented Jan 9, 2017

"So either it has to create parent directories first (then config file might be erased upon first start)"

However, this is something to fact check, just a worry i got atm :p

PS: I implemented that function, so I know it exists :p
4564bd2#diff-a827ecc5680e4f8b88a20803ab45835f

@UltimateByte UltimateByte self-assigned this Jan 9, 2017
@UltimateByte
Copy link
Contributor Author

Assigning, will try stuff after work in around 10 hours if I'm still able to use my fingers. :o))

@MagisterRubick
Copy link

Any good news?

@UltimateByte
Copy link
Contributor Author

UltimateByte commented Jan 10, 2017

Went back home a couple of hours ago. Just made a branch, will try stuff.
BTW, if my workaround i told you about on Discord didn't work, then your issue is probably not just the config file.

@UltimateByte
Copy link
Contributor Author

UltimateByte commented Jan 10, 2017

Well, config file is managed kinda weirdly with Ark. But I figured it out. Creating the full path is enough to solve the issue. However, admin password and servername are set within start parameters, so i gotta remove their edition by LGSM.

@UltimateByte
Copy link
Contributor Author

Port values might need to be removed from default config file since they are ignored and start parameters are used instead,. On top of that, those are not changed upon server shutdown to match start parameters, so in the end, if they're not used, they can be misleading.

Any enlightened thought about that?

UltimateByte added a commit that referenced this issue Jan 13, 2017
No config alteration for Ark, and requires to create the cfgdir. 
+ Rearranging presentation to make more visual sense
@UltimateByte
Copy link
Contributor Author

Merged to develop. Closing.

@lock
Copy link

lock bot commented Jul 19, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants