Browse Source

Auto stash before merge of "feature/check-update" and "h3o66/feature/check-update"

pull/3151/head
Daniel Gibbs 5 years ago
parent
commit
f79962848c
  1. 18
      lgsm/functions/core_steamcmd.sh
  2. 88
      linuxgsm.sh

18
lgsm/functions/core_steamcmd.sh

@ -126,16 +126,16 @@ fn_check_steamcmd_ark(){
} }
fn_check_steamcmd_clear(){ fn_check_steamcmd_clear(){
# Will remove steamcmd dir if steamcmd package is installed. # Will remove steamcmd dir if steamcmd package is installed.
if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then
rm -rf "${steamcmddir:?}" rm -rf "${steamcmddir:?}"
exitcode=$? exitcode=$?
if [ "${exitcode}" != 0 ]; then if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal "Removing ${rootdir}/steamcmd" fn_script_log_fatal "Removing ${rootdir}/steamcmd"
else else
fn_script_log_pass "Removing ${rootdir}/steamcmd" fn_script_log_pass "Removing ${rootdir}/steamcmd"
fi
fi fi
fi
} }
fn_check_steamcmd_exec(){ fn_check_steamcmd_exec(){

88
linuxgsm.sh

@ -401,50 +401,56 @@ else
fi fi
fi fi
fi fi
# shellcheck source=/dev/null # Configs have to be loaded twice to allow start startparameters to pick up all vars
source "${configdirserver}/_default.cfg" fn_configs(){
# Load the common.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${configdirserver}/common.cfg" source "${configdirserver}/_default.cfg"
else # Load the common.cfg config. If missing download it.
# shellcheck source=/dev/null if [ ! -f "${configdirserver}/common.cfg" ]; then
source "${configdirserver}/common.cfg" fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
fi # shellcheck source=/dev/null
# Load the secrets-common.cfg config. If missing download it. source "${configdirserver}/common.cfg"
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then else
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" # shellcheck source=/dev/null
# shellcheck source=/dev/null source "${configdirserver}/common.cfg"
source "${configdirserver}/secrets-common.cfg" fi
else # Load the secrets-common.cfg config. If missing download it.
# shellcheck source=/dev/null if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
source "${configdirserver}/secrets-common.cfg" fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
fi # shellcheck source=/dev/null
# Load the instance.cfg config. If missing download it. source "${configdirserver}/secrets-common.cfg"
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then else
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" # shellcheck source=/dev/null
# shellcheck source=/dev/null source "${configdirserver}/secrets-common.cfg"
source "${configdirserver}/${selfname}.cfg" fi
else # Load the instance.cfg config. If missing download it.
# shellcheck source=/dev/null if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
source "${configdirserver}/${selfname}.cfg" fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
fi # shellcheck source=/dev/null
# Load the secrets-instance.cfg config. If missing download it. source "${configdirserver}/${selfname}.cfg"
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then else
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" # shellcheck source=/dev/null
# shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg"
source "${configdirserver}/secrets-${selfname}.cfg" fi
else # Load the secrets-instance.cfg config. If missing download it.
# shellcheck source=/dev/null if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
source "${configdirserver}/secrets-${selfname}.cfg" fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
fi # shellcheck source=/dev/null
source "${configdirserver}/secrets-${selfname}.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/secrets-${selfname}.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it. # Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5"
fi fi
}
fn_configs
fn_configs
fi fi
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
fn_ansi_loader fn_ansi_loader
# Prevents running of core_exit.sh for Travis-CI. # Prevents running of core_exit.sh for Travis-CI.

Loading…
Cancel
Save