|
@@ -34,8 +34,13 @@ fn_default_config_remote() {
|
|
|
if [ "${config}" == "${servercfgdefault}" ]; then
|
|
if [ "${config}" == "${servercfgdefault}" ]; then
|
|
|
mkdir -p "${servercfgdir}"
|
|
mkdir -p "${servercfgdir}"
|
|
|
echo -en "copying config file [ ${italic}${servercfgfullpath}${default} ]"
|
|
echo -en "copying config file [ ${italic}${servercfgfullpath}${default} ]"
|
|
|
- changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}")
|
|
|
|
|
- exitcode=$?
|
|
|
|
|
|
|
+ if [ ! -e "${servercfgfullpath}" ] && [ ! -L "${servercfgfullpath}" ]; then
|
|
|
|
|
+ cp "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}"
|
|
|
|
|
+ exitcode=$?
|
|
|
|
|
+ [ "${exitcode}" -eq 0 ] && changes="copied"
|
|
|
|
|
+ else
|
|
|
|
|
+ exitcode=0
|
|
|
|
|
+ fi
|
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "copying config file ${servercfgfullpath}"
|
|
fn_script_log_fail "copying config file ${servercfgfullpath}"
|
|
@@ -48,7 +53,13 @@ fn_default_config_remote() {
|
|
|
elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then
|
|
elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then
|
|
|
mkdir -p "${servercfgdir}"
|
|
mkdir -p "${servercfgdir}"
|
|
|
echo -en "copying config file [ ${italic}${networkcfgfullpath}${default} ]"
|
|
echo -en "copying config file [ ${italic}${networkcfgfullpath}${default} ]"
|
|
|
- changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}")
|
|
|
|
|
|
|
+ if [ ! -e "${networkcfgfullpath}" ] && [ ! -L "${networkcfgfullpath}" ]; then
|
|
|
|
|
+ cp "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}"
|
|
|
|
|
+ exitcode=$?
|
|
|
|
|
+ [ "${exitcode}" -eq 0 ] && changes="copied"
|
|
|
|
|
+ else
|
|
|
|
|
+ exitcode=0
|
|
|
|
|
+ fi
|
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "copying config file ${networkcfgdefault}"
|
|
fn_script_log_fail "copying config file ${networkcfgdefault}"
|
|
@@ -60,7 +71,13 @@ fn_default_config_remote() {
|
|
|
fi
|
|
fi
|
|
|
elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then
|
|
elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then
|
|
|
echo -en "copying config file [ ${italic}${clustercfgfullpath}${default} ]"
|
|
echo -en "copying config file [ ${italic}${clustercfgfullpath}${default} ]"
|
|
|
- changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}")
|
|
|
|
|
|
|
+ if [ ! -e "${clustercfgfullpath}" ] && [ ! -L "${clustercfgfullpath}" ]; then
|
|
|
|
|
+ cp "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}"
|
|
|
|
|
+ exitcode=$?
|
|
|
|
|
+ [ "${exitcode}" -eq 0 ] && changes="copied"
|
|
|
|
|
+ else
|
|
|
|
|
+ exitcode=0
|
|
|
|
|
+ fi
|
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "copying config file ${clustercfgfullpath}"
|
|
fn_script_log_fail "copying config file ${clustercfgfullpath}"
|
|
@@ -72,7 +89,13 @@ fn_default_config_remote() {
|
|
|
fi
|
|
fi
|
|
|
else
|
|
else
|
|
|
echo -en "copying config file [ ${italic}${servercfgdir}/${config}${default} ]"
|
|
echo -en "copying config file [ ${italic}${servercfgdir}/${config}${default} ]"
|
|
|
- changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}")
|
|
|
|
|
|
|
+ if [ ! -e "${servercfgdir}/${config}" ] && [ ! -L "${servercfgdir}/${config}" ]; then
|
|
|
|
|
+ cp "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}"
|
|
|
|
|
+ exitcode=$?
|
|
|
|
|
+ [ "${exitcode}" -eq 0 ] && changes="copied"
|
|
|
|
|
+ else
|
|
|
|
|
+ exitcode=0
|
|
|
|
|
+ fi
|
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
if [ "${exitcode}" -ne 0 ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "copying config file ${servercfgdir}/${config}"
|
|
fn_script_log_fail "copying config file ${servercfgdir}/${config}"
|