diff --git a/lgsm/config-default/config-lgsm/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg index bf0722f72..44036ec5b 100644 --- a/lgsm/config-default/config-lgsm/xntserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -141,10 +141,11 @@ glibc="2.3.2" ## Game Server Directories systemdir="${serverfiles}/Xonotic/" -executabledir="${serverfiles}/Xonotic/" +executabledir="${systemdir}" executable="./xonotic-linux64-dedicated" -servercfgdir="${serverfiles}/Xonotic/${selfname}" +servercfgdir="${systemdir}/${selfname}" servercfg="server.cfg" +servercfgdefault="${systemdir}/server/server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh index 97eefa362..7a3126e31 100644 --- a/lgsm/modules/fix_xnt.sh +++ b/lgsm/modules/fix_xnt.sh @@ -11,8 +11,3 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -d "${serverfiles}/Xonotic/${selfname}/data" ]; then mkdir -p "${serverfiles}/Xonotic/${selfname}/data" fi - -# Copy the server.cfg file if it exists -if [ ! -f "${serverfiles}/Xonotic/${selfname}/data/server.cfg" ]; then - cp "${serverfiles}/Xonotic/server/server.cfg" "${serverfiles}/Xonotic/${selfname}/data/server.cfg" -fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 22843c7b0..582862e26 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -62,6 +62,12 @@ fn_default_config_local() { fn_messages_separator echo -e "Copying default configs." fn_check_cfgdir + + # Check if the directory for ${servercfgfullpath} exists, if not, create it + if [ ! -d "${servercfgfullpath}" ]; then + mkdir -p "${servercfgfullpath}" + fi + echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" if [ "${exitcode}" != 0 ]; then @@ -72,7 +78,6 @@ fn_default_config_local() { fn_script_log_pass "copying config file [ ${servercfgdefault} ]" fi } - # Changes some variables within the default configs. # SERVERNAME to LinuxGSM # PASSWORD to random password @@ -835,6 +840,9 @@ elif [ "${shortname}" == "wmc" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${shortname}" == "xnt" ]; then + fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "wurm" ]; then array_configs+=(server.cfg) fn_fetch_default_config