瀏覽代碼

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.
Daniel Gibbs 2 年之前
父節點
當前提交
81e5fe66ea
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      lgsm/config-default/config-lgsm/dstserver/_default.cfg
  2. 1 1
      lgsm/modules/install_config.sh

+ 1 - 0
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"
 

+ 1 - 1
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