From 4564bd2d430a7babfa0d93313cb3714512d79764 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 18 Oct 2016 00:45:05 +0200 Subject: [PATCH 1/2] cfg folder needs to be created for Arma3 --- lgsm/functions/install_config.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index db634f87c..99a882691 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -36,6 +36,15 @@ fn_set_config_vars(){ sleep 1 } +# Checks if cfg dir exists, creates it if it doesn't +fn_check_cfgdir(){ + if [ ! -d "${servercfgdir}" ]; then + echo "creating ${servercfgdir} config folder." + fn_script_log_info "creating ${servercfgdir} config folder." + mkdir -pv + fi +} + # Copys the default configs from Game-Server-Configs repo to the # correct location fn_default_config_remote(){ @@ -75,6 +84,7 @@ elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_set_config_vars elif [ "${gamename}" == "ARMA 3" ]; then gamedirname="Arma3" + fn_check_cfgdir array_configs+=( server.cfg network.cfg ) fn_fetch_default_config fn_default_config_remote From 88729addd1006dd2075af64a6e4aa80b5bd562d1 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 18 Oct 2016 00:50:00 +0200 Subject: [PATCH 2/2] with the actual target folder, better --- lgsm/functions/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 99a882691..6cd4a7dc4 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -41,7 +41,7 @@ fn_check_cfgdir(){ if [ ! -d "${servercfgdir}" ]; then echo "creating ${servercfgdir} config folder." fn_script_log_info "creating ${servercfgdir} config folder." - mkdir -pv + mkdir -pv "${servercfgdir}" fi }