Skip to content

Commit

Permalink
ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Nov 23, 2024
1 parent 7f40e2d commit a7ee739
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 20 deletions.
54 changes: 40 additions & 14 deletions lgsm/modules/install_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,69 @@ fn_default_config_remote() {
echo -e ""
echo -e "${bold}${lightyellow}Downloading ${gamename} Configs${default}"
fn_messages_separator
echo -e "Downloading default configs from:"
echo -e "${italic}https://github.com/GameServerManagers/Game-Server-Configs${default}"
echo -e "Downloading default configs from: ${italic}https://github.com/GameServerManagers/Game-Server-Configs${default}"
echo -e ""
fn_sleep_time_1
mkdir -p "${lgsmdir}/config-default/config-game"
githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main"
for config in "${array_configs[@]}"; do
# Downloads default configs from Game-Server-Configs repo to lgsm/config-default.
fn_fetch_file "${githuburl}/${shortname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash"

# Every config is copied.
echo -e "copying ${config} config file."
fn_script_log_info "Copying ${servercfg} config file."
if [ "${config}" == "${servercfgdefault}" ]; then
mkdir -p "${servercfgdir}"
echo -en "copying config file [ ${italic}${servercfgfullpath}${default} ]"
changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}")
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fail "copying config file ${servercfgfullpath}"
elif [ "${changes}" != "" ]; then
fn_print_ok_eol_nl
fn_script_log_pass "copying config file ${servercfgfullpath}"
else
fn_print_skip_eol_nl
fi
elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then
mkdir -p "${servercfgdir}"
echo -en "copying config file [ ${italic}${networkcfgfullpath}${default} ]"
changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}")
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fail "copying config file ${networkcfgdefault}"
elif [ "${changes}" != "" ]; then
fn_print_ok_eol_nl
fn_script_log_pass "copying config file ${networkcfgdefault}"
else
fn_print_skip_eol_nl
fi
elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then
echo -en "copying config file [ ${italic}${clustercfgfullpath}${default} ]"
changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}")
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fail "copying config file ${clustercfgfullpath}"
elif [ "${changes}" != "" ]; then
fn_print_ok_eol_nl
fn_script_log_pass "copying config file ${clustercfgfullpath}"
else
fn_print_skip_eol_nl
fi
else
echo -en "copying config file [ ${italic}${servercfgdir}/${config}${default} ]"
changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}")
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fail "copying config file ${servercfgdir}/${config}"
elif [ "${changes}" != "" ]; then
fn_print_ok_eol_nl
fn_script_log_pass "copying config file ${servercfgdir}/${config}"
else
fn_print_skip_eol_nl
fi
fi
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fail "copying config file ${servercfgfullpath}"
elif [ "${changes}" != "" ]; then
fn_print_ok_eol_nl
fn_script_log_pass "copying config file ${servercfgfullpath}"
else
fn_print_skip_eol_nl
fi

unset changes
done
}
Expand Down
12 changes: 6 additions & 6 deletions lgsm/modules/install_gslt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ else
fi

echo -e ""
echo -e "Get more info: ${italic}https://docs.linuxgsm.com/steamcmd/gslt${default}"
fn_script_log_info "Get more info: https://docs.linuxgsm.com/steamcmd/gslt"
echo -e "More info: ${italic}https://docs.linuxgsm.com/steamcmd/gslt${default}"
fn_script_log_info "More info: https://docs.linuxgsm.com/steamcmd/gslt"
echo -e ""
if [ -z "${autoinstall}" ]; then
if [ "${shortname}" != "tu" ]; then
Expand All @@ -36,10 +36,10 @@ if [ -z "${autoinstall}" ]; then
fi

if [ "${shortname}" == "tu" ]; then
echo -e "The GSLT can be changed by editing ${italic}${servercfgdir}/${servercfg}${default}"
fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
echo -e "The GSLT can be changed by editing: ${italic}${servercfgdir}/${servercfg}${default}"
fn_script_log_info "The GSLT can be changed by editing: ${servercfgdir}/${servercfg}."
else
echo -e "The GSLT can be changed by editing ${italic}${configdirserver}/${selfname}.cfg${default}"
fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg."
echo -e "The GSLT can be changed by editing: ${italic}${configdirserver}/${selfname}.cfg${default}"
fn_script_log_info "The GSLT can be changed by editing: ${configdirserver}/${selfname}.cfg."
fi
fn_sleep_time_1

0 comments on commit a7ee739

Please sign in to comment.