Browse Source

fix: revert modules in functions dir to v23.2.3

pull/4213/head
Daniel Gibbs 2 years ago
parent
commit
f9a5ed089a
  1. 2
      lgsm/functions/check_logs.sh
  2. 2
      lgsm/functions/check_root.sh
  3. 48
      lgsm/functions/command_update_linuxgsm.sh
  4. 110
      lgsm/functions/core_dl.sh
  5. 18
      lgsm/functions/core_exit.sh
  6. 294
      lgsm/functions/core_functions.sh
  7. 14
      lgsm/functions/core_getopt.sh
  8. 6
      lgsm/functions/core_github.sh
  9. 11
      lgsm/functions/core_legacy.sh
  10. 2
      lgsm/functions/core_logs.sh
  11. 2
      lgsm/functions/core_messages.sh
  12. 4
      lgsm/functions/core_steamcmd.sh
  13. 2
      lgsm/functions/core_trap.sh

2
lgsm/functions/check_logs.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if log files exist.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_logs() {
fn_print_dots "Checking for log files"

2
lgsm/functions/check_root.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if the user tried to run the script as root.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
if [ "${commandname}" != "INSTALL" ]; then

48
lgsm/functions/command_update_linuxgsm.sh

@ -3,11 +3,11 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Deletes the modules dir to allow re-downloading of modules from GitHub.
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
commandname="UPDATE-LGSM"
commandaction="Updating LinuxGSM"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@ -180,49 +180,49 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
fi
fi
# Check and update modules.
if [ -n "${modulesdir}" ]; then
if [ -d "${modulesdir}" ]; then
if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then
(
cd "${modulesdir}" || exit
for modulefile in *; do
cd "${functionsdir}" || exit
for functionfile in *; do
# check if module exists in the repo and remove if missing.
# commonly used if module names change.
echo -en "checking ${remotereponame} module ${modulefile}...\c"
github_file_url_dir="lgsm/modules"
echo -en "checking ${remotereponame} module ${functionfile}...\c"
github_file_url_dir="lgsm/functions"
if [ "${remotereponame}" == "GitHub" ]; then
curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null
else
curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null
fi
if [ $? != 0 ]; then
fn_print_error_eol_nl
fn_script_log_error "Checking ${remotereponame} module ${modulefile}"
echo -en "removing module ${modulefile}...\c"
if ! rm -f "${modulefile:?}"; then
fn_script_log_error "Checking ${remotereponame} module ${functionfile}"
echo -en "removing module ${functionfile}...\c"
if ! rm -f "${functionfile:?}"; then
fn_print_fail_eol_nl
fn_script_log_fatal "Removing module ${modulefile}"
fn_script_log_fatal "Removing module ${functionfile}"
core_exit.sh
else
fn_print_ok_eol_nl
fn_script_log_pass "Removing module ${modulefile}"
fn_script_log_pass "Removing module ${functionfile}"
fi
else
# compare file
if [ "${remotereponame}" == "GitHub" ]; then
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}"))
else
module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}"))
fi
# results
if [ "${module_file_diff}" != "" ]; then
if [ "${function_file_diff}" != "" ]; then
fn_print_update_eol_nl
fn_script_log_update "Checking ${remotereponame} module ${modulefile}"
rm -rf "${modulesdir:?}/${modulefile}"
fn_update_module
fn_script_log_update "Checking ${remotereponame} module ${functionfile}"
rm -rf "${functionsdir:?}/${functionfile}"
fn_update_function
else
fn_print_ok_eol_nl
fn_script_log_pass "Checking ${remotereponame} module ${modulefile}"
fn_script_log_pass "Checking ${remotereponame} module ${functionfile}"
fi
fi
done
@ -230,7 +230,7 @@ if [ -n "${modulesdir}" ]; then
fi
fi
fn_print_ok_nl "Updating modules"
fn_script_log_pass "Updating modules"
fn_print_ok_nl "Updating functions"
fn_script_log_pass "Updating functions"
core_exit.sh

110
lgsm/functions/core_dl.sh

@ -17,7 +17,7 @@
# fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
# fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_dl_steamcmd() {
fn_print_start_nl "${remotelocation}"
@ -453,13 +453,11 @@ fn_fetch_file() {
fi
}
# GitHub file download modules.
# GitHub file download functions.
# Used to simplify downloading specific files from GitHub.
# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules
# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh
# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules
# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh
# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions
# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh
# githuburl: the full GitHub url
# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2
@ -472,58 +470,58 @@ fn_fetch_file() {
# Fetches files from the Git repo.
fn_fetch_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# For legacy versions - code can be removed at a future date
if [ "${legacymode}" == "1" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"
hash="${7:-0}"
# Passes vars to the file download module.
# Passes vars to the file download function.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
fn_check_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_file_url_name}"
fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}"
}
# Fetches config files from the Git repo.
fn_fetch_config() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
@ -533,55 +531,55 @@ fn_fetch_config() {
run="norun"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download module.
# Passes vars to the file download function.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
# Fetches modules from the Git repo during first download.
fn_fetch_module() {
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
fn_fetch_function() {
github_fileurl_dir="lgsm/functions"
github_fileurl_name="${functionfile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
local_filedir="${functionsdir}"
local_filename="${github_fileurl_name}"
chmodx="chmodx"
run="run"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download module.
# Passes vars to the file download function.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
# Fetches modules from the Git repo during update-lgsm.
fn_update_module() {
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
fn_update_function() {
github_fileurl_dir="lgsm/functions"
github_fileurl_name="${functionfile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
local_filedir="${functionsdir}"
local_filename="${github_fileurl_name}"
chmodx="chmodx"
run="norun"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download module.
# Passes vars to the file download function.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
@ -620,7 +618,7 @@ fn_dl_latest_release_github() {
fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}"
fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}"
else
# Fetch file from the remote location from the existing module to the ${tmpdir} for now.
# Fetch file from the remote location from the existing function to the ${tmpdir} for now.
fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}"
fi
fi

18
lgsm/functions/core_exit.sh

@ -5,14 +5,14 @@
# Website: https://linuxgsm.com
# Description: Handles exiting of LinuxGSM by running and reporting an exit code.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_dev_debug() {
if [ -f "${rootdir}/.dev-debug" ]; then
echo -e ""
echo -e "${moduleselfname} exiting with code: ${exitcode}"
echo -e "${functionselfname} exiting with code: ${exitcode}"
if [ -f "${rootdir}/dev-debug.log" ]; then
grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log"
fi
fi
}
@ -29,13 +29,13 @@ elif [ "${exitcode}" != "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
if [ "${exitcode}" == "1" ]; then
fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}"
fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "2" ]; then
fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}"
fn_script_log_error "${functionselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "3" ]; then
fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
else
fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
fi
fn_exit_dev_debug
# remove trap.
@ -44,7 +44,7 @@ elif [ "${exitcode}" != "0" ]; then
elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}"
fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}"
fn_exit_dev_debug
# remove trap.
trap - INT
@ -53,7 +53,7 @@ else
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
fn_print_error "No exit code set"
fn_script_log_pass "${moduleselfname} exiting with code: NOT SET"
fn_script_log_pass "${functionselfname} exiting with code: NOT SET"
fn_exit_dev_debug
# remove trap.
trap - INT

294
lgsm/functions/core_functions.sh

@ -6,7 +6,7 @@
# Description: Defines all functions to allow download and execution of functions using fn_fetch_function.
# This function is called first before any other function. Without this file other functions will not load.
module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v23.2.3"
@ -41,653 +41,653 @@ core_legacy.sh() {
core_exit.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
core_getopt.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
core_trap.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
core_steamcmd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
core_github.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Commands
command_backup.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_console.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_debug.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_details.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_sponsor.sh() {
command_donate.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_postdetails.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_test_alert.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_monitor.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_start.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_stop.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_validate.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_install.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_install_resources_mta.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_squad_license.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_mods_install.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_mods_update.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_mods_remove.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_fastdl.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_ts3_server_pass.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_restart.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_skeleton.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_wipe.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_send.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Checks
check.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_config.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_deps.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_executable.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_glibc.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_ip.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_last_update.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_logs.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_permissions.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_root.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_status.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_steamcmd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_system_dir.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_system_requirements.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_tmuxception.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
check_version.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Compress
compress_unreal2_maps.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
compress_ut99_maps.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Mods
mods_list.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
mods_core.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Dev
command_dev_clear_functions.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_dev_debug.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_dev_detect_deps.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_dev_detect_glibc.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_dev_detect_ldd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_dev_query_raw.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Fix
fix.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ark.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_av.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_arma3.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_armar.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_bt.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_bo.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_cmw.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_csgo.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_dst.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_hw.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ins.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_kf.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_kf2.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_lo.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_mcb.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_mta.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_nmrih.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_onset.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ro.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_rust.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_rw.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_sfc.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_st.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_steamcmd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_terraria.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_tf2.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ut3.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_rust.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_samp.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_sdtd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_sof2.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_squad.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ts3.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ut2k4.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_ut.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_unt.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_vh.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_wurm.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fix_zmr.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Info
info_distro.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
info_game.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
info_messages.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
info_stats.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Alert
alert.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_discord.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_email.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_ifttt.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_mailgun.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_pushbullet.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_pushover.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_gotify.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_telegram.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_rocketchat.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
alert_slack.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Logs
core_logs.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Query
query_gamedig.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Update
command_update_functions.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_update_linuxgsm.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_update.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
command_check_update.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_ts3.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_minecraft.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_minecraft_bedrock.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_papermc.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_mta.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_factorio.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_jediknight2.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_steamcmd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_vintagestory.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
update_ut99.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
fn_update_functions.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
#
@ -701,96 +701,96 @@ fn_autoinstall() {
install_complete.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_config.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_factorio_save.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_dst_token.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_eula.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_gsquery.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_gslt.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_header.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_logs.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_retry.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_server_dir.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_server_files.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_stats.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_steamcmd.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_ts3.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_ts3db.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_ut2k4.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_dl_ut2k4.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
install_ut2k4_key.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_module
fn_fetch_function
}
# Calls code required for legacy servers

14
lgsm/functions/core_getopt.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: getopt arguments.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
### Define all commands here.
## User commands | Trigger commands | Description
@ -18,11 +18,11 @@ cmd_restart=("r;restart" "command_restart.sh" "Restart the server.")
cmd_details=("dt;details" "command_details.sh" "Display server information.")
cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).")
cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.")
cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.")
cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.")
cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.")
cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.")
cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.")
cmd_sponso=("s;sponsor" "command_sponsor.sh" "Donation options.")
cmd_donate=("do;donate" "command_donate.sh" "Donation options.")
cmd_send=("sd;send" "command_send.sh" "Send command to game server console.")
# Console servers only.
cmd_console=("c;console" "command_console.sh" "Access server console.")
@ -54,7 +54,7 @@ cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect requi
cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.")
cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.")
cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.")
cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.")
cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.")
### Set specific opt here.
@ -145,11 +145,11 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}")
## Developer commands.
currentopt+=("${cmd_dev_debug[@]}")
if [ -f ".dev-debug" ]; then
currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}")
currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}")
fi
## Sponsor.
currentopt+=("${cmd_sponsor[@]}")
## Donate.
currentopt+=("${cmd_donate[@]}")
### Build list of available commands.
optcommands=()

6
lgsm/functions/core_github.sh

@ -1,11 +1,11 @@
#!/bin/bash
# LinuxGSM core_github.sh module
# LinuxGSM core_github.sh function
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: core module file for updates via github
# Description: core function file for updates via github
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
github_api="https://api.github.com"

11
lgsm/functions/core_legacy.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Code for backwards compatability with older versions of LinuxGSM.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# This is to help the transition to v20.3.0 and above
legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0)
@ -78,15 +78,6 @@ if [ -z "${wsstartmap}" ]; then
fi
fi
# Added as part of migrating functions dir to modules dir.
# Will remove functions dir if files in modules dir older than 14 days
functionsdir="${lgsmdir}/modules"
if [ -d "${lgsmdir}/functions" ]; then
if [ "$(find "${lgsmdir}/modules"/ -type f -mtime +"14" | wc -l)" -ne "0" ]; then
rm -rf "${lgsmdir:?}/functions"
fi
fi
fn_parms() {
fn_reload_startparameters
parms="${startparameters}"

2
lgsm/functions/core_logs.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Acts as a log rotator, removing old logs.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if logfile variable and file exist, create logfile if it doesn't exist.
if [ "${consolelog}" ]; then

2
lgsm/functions/core_messages.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Defines on-screen messages such as [ OK ] and how script logs look.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# nl: new line: message is following by a new line.
# eol: end of line: message is placed at the end of the current line.

4
lgsm/functions/core_steamcmd.sh

@ -3,9 +3,9 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Core modules for SteamCMD
# Description: Core functions for SteamCMD
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_steamcmd() {
if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then

2
lgsm/functions/core_trap.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Handles CTRL-C trap to give an exit code.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_trap() {
if [ -z "${exitcode}" ]; then

Loading…
Cancel
Save