From 81e5fe66ea333722cd9c296ed945bc2c9dd6a295 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 30 Sep 2023 21:01:27 +0100 Subject: [PATCH] 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. --- lgsm/config-default/config-lgsm/dstserver/_default.cfg | 1 + lgsm/modules/install_config.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 590e09ed03..b996b0a15e 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -10,6 +10,7 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters cluster="Cluster_1" +shard="Master" persistentstorageroot="${HOME}/.klei" confdir="DoNotStarveTogether" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 1da3873aaa..07aeca5552 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -66,7 +66,7 @@ fn_default_config_remote() { changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}") fi 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}" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl