Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lgsm/modules/command_install_resources_mta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ else
fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install."
fn_print_information_nl "To install default resources use ./${selfname} install"
fi

if [ "${firstcommandname}" == "DEFAULT-RESOURCES" ]; then
exitcode=0
core_exit.sh
fi
2 changes: 2 additions & 0 deletions lgsm/modules/core_dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ fn_dl_extract() {
fn_script_log_fail "Extracting ${local_filename}"
fn_script_log_fail "File ${local_filedir}/${local_filename} not found"
core_exit.sh
return 1
fi
mime=$(file -b --mime-type "${local_filedir}/${local_filename}")
if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then
Expand Down Expand Up @@ -359,6 +360,7 @@ fn_dl_extract() {
fi
echo -e "${extractcmd}"
core_exit.sh
return 1
else
fn_print_ok_eol_nl
fn_script_log_pass "Extracting ${local_filename}"
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/core_steamcmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn_install_steamcmd() {
mkdir -p "${steamcmddir}"
fi
fn_fetch_file "https://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash"
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" || return 1
chmod +x "${steamcmddir}/steamcmd.sh"
}

Expand Down
8 changes: 8 additions & 0 deletions lgsm/modules/install_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ echo -en "creating log directory [ ${italic}${logdir}${default} ]"
if [ ! -d "${logdir}" ]; then
if ! mkdir -p "${logdir}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating log directory ${logdir}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -29,6 +30,7 @@ echo -en "creating script log directory [ ${italic}${lgsmlogdir}${default} ]"
if [ ! -d "${lgsmlogdir}" ]; then
if ! mkdir -p "${lgsmlogdir}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating script log directory ${lgsmlogdir}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -41,6 +43,7 @@ echo -en "creating script log [ ${italic}${lgsmlog}${default} ]"
if [ ! -f "${lgsmlog}" ]; then
if ! touch "${lgsmlog}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating script log ${lgsmlog}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -53,6 +56,7 @@ echo -en "creating console log directory [ ${italic}${consolelogdir}${default} ]
if [ ! -d "${consolelogdir}" ]; then
if ! mkdir -p "${consolelogdir}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating console log directory ${consolelogdir}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -65,6 +69,7 @@ echo -en "creating console log [ ${italic}${consolelog}${default} ]"
if [ ! -f "${consolelog}" ]; then
if ! touch "${consolelog}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating console log ${consolelog}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -78,6 +83,7 @@ if [ -n "${gamelogdir}" ]; then
if [ ! -d "${gamelogdir}" ]; then
if ! mkdir -p "${gamelogdir}"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating game log directory ${gamelogdir}"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -97,6 +103,7 @@ if [ -n "${gamelogdir}" ] && [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; th
if [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; then
if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating symlink to game log directory ${logdir}/server"
core_exit.sh
else
fn_print_ok_eol_nl
Expand All @@ -112,6 +119,7 @@ if [ -d "${HOME}/.steam/steam/logs" ]; then
if [ ! -L "${logdir}/steam" ]; then
if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then
fn_print_fail_eol_nl
fn_script_log_fail "Creating symlink to steam log directory ${logdir}/steam"
core_exit.sh
else
fn_print_ok_eol_nl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_bb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "${remotebuildhash}"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
echo "${remotebuild}" > "${serverfiles}/build.txt"
fn_clear_tmp
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_etl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "${remotebuildhash}"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
echo "${remotebuild}" > "${serverfiles}/build.txt"
fn_clear_tmp
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_fctr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "nohash"
fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${serverfiles}" "factorio"
fn_clear_tmp
}
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_jk2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "nohash"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64"
fn_clear_tmp
}
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_mta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to tmpdir.
fn_fetch_file "https://linux.multitheftauto.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash"
fn_fetch_file "https://linux.multitheftauto.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "forcedl" "nohash"
fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64"
fn_clear_tmp
}
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_pmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "forcedl" "${remotebuildhash}"
cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}"
echo "${remotebuild}" > "${serverfiles}/build.txt"
fn_clear_tmp
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_ts3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "${remotebuildhash}"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}"
fn_clear_tmp
}
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_ut99.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "nohash"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
echo "${remotebuild}" > "${serverfiles}/build.txt"
fn_clear_tmp
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_vints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "${remotebuildhash}"
rm -rf "${serverfiles:?}/assets"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
fn_clear_tmp
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_xnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "forcedl" "${remotebuildhash}"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "Xonotic"
fn_clear_tmp
}
Expand Down
Loading