From d95c63028324648c9fb3a0069aedd4c25b0f5643 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 22:11:40 +0100 Subject: [PATCH] more development --- lgsm/functions/install_config.sh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index bcb0e8c68..5a9e26e6b 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -42,33 +42,29 @@ fn_user_input_config(){ sleep 1 } -# Copys the default config from remote repo +# Copys the default configs from Game-Server-Configs repo to the +# correct location fn_default_config_remote(){ for config in "${array_configs[@]}" do + # every config is copied echo "copying ${servercfg} config file." fn_script_log_info "copying ${servercfg} config file." - cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + if [ "${config}" == "${servercfgdefault}" ]; then + cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + else + cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}" + fi done + # the main config is renamed to the script default + cp -v "${servercfgdefault}" "${servercfgfullpath}" sleep 1 } -# Copys the default config already available -fn_default_config_local(){ - for config in "${array_configs[@]}" - do - echo "copying ${servercfg} config file." - fn_script_log_info "copying ${servercfg} config file." - cp -v "${servercfgdefault}" "${servercfgfullpath}" - done - sleep 1 -} - - echo "" echo "Downloading ${gamename} Config" echo "=================================" -echo "Configs from https://github.com/GameServerManagers/Game-Server-Configs" +echo "default configs from https://github.com/GameServerManagers/Game-Server-Configs" sleep 2 if [ "${gamename}" == "7 Days To Die" ]; then gamedirname="7DaysToDie"