Browse Source
refactor: improve error message in install_config.sh
The commit refactors the code in `install_config.sh` to improve the error message when copying a config file. The function `fn_print_failure_eol_nl` is renamed to `fn_print_fail_eol_nl` for clarity and consistency. This change enhances the readability and maintainability of the code.
feature/dst-changes
Daniel Gibbs
2 years ago
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
2 changed files with
2 additions and
1 deletions
lgsm/config-default/config-lgsm/dstserver/_default.cfg
lgsm/modules/install_config.sh
@ -10,6 +10,7 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
cluster = "Cluster_1"
cluster = "Cluster_1"
shard = "Master"
persistentstorageroot = "${HOME}/.klei"
persistentstorageroot = "${HOME}/.klei"
confdir = "DoNotStarveTogether"
confdir = "DoNotStarveTogether"
@ -66,7 +66,7 @@ fn_default_config_remote() {
changes += $( cp -nv " ${ lgsmdir } /config-default/config-game/ ${ config } " " ${ servercfgdir } / ${ config } " )
changes += $( cp -nv " ${ lgsmdir } /config-default/config-game/ ${ config } " " ${ servercfgdir } / ${ config } " )
fi
fi
if [ " $? " -ne 0 ] ; then # shellcheck disable=SC2181
if [ " $? " -ne 0 ] ; then # shellcheck disable=SC2181
fn_print_failure _eol_nl
fn_print_fail_eol_nl
fn_script_log_fatal " copying config file ${ servercfgfullpath } "
fn_script_log_fatal " copying config file ${ servercfgfullpath } "
elif [ " ${ changes } " != "" ] ; then
elif [ " ${ changes } " != "" ] ; then
fn_print_ok_eol_nl
fn_print_ok_eol_nl