Browse Source

renamed function to module

also renamed donate to sponsor
pull/4166/head
Daniel Gibbs 4 years ago
parent
commit
a139cf38a6
  1. 4
      lgsm/functions/README.md
  2. 4
      lgsm/functions/alert.sh
  3. 2
      lgsm/functions/alert_discord.sh
  4. 2
      lgsm/functions/alert_email.sh
  5. 2
      lgsm/functions/alert_ifttt.sh
  6. 2
      lgsm/functions/alert_mailgun.sh
  7. 2
      lgsm/functions/alert_pushbullet.sh
  8. 2
      lgsm/functions/alert_pushover.sh
  9. 2
      lgsm/functions/alert_rocketchat.sh
  10. 2
      lgsm/functions/alert_slack.sh
  11. 2
      lgsm/functions/alert_telegram.sh
  12. 4
      lgsm/functions/check.sh
  13. 2
      lgsm/functions/check_config.sh
  14. 2
      lgsm/functions/check_deps.sh
  15. 2
      lgsm/functions/check_executable.sh
  16. 2
      lgsm/functions/check_glibc.sh
  17. 2
      lgsm/functions/check_ip.sh
  18. 2
      lgsm/functions/check_last_update.sh
  19. 2
      lgsm/functions/check_logs.sh
  20. 18
      lgsm/functions/check_permissions.sh
  21. 2
      lgsm/functions/check_root.sh
  22. 2
      lgsm/functions/check_status.sh
  23. 2
      lgsm/functions/check_steamcmd.sh
  24. 2
      lgsm/functions/check_system_dir.sh
  25. 2
      lgsm/functions/check_system_requirements.sh
  26. 2
      lgsm/functions/check_tmuxception.sh
  27. 2
      lgsm/functions/check_version.sh
  28. 2
      lgsm/functions/command_backup.sh
  29. 2
      lgsm/functions/command_check_update.sh
  30. 2
      lgsm/functions/command_console.sh
  31. 2
      lgsm/functions/command_debug.sh
  32. 2
      lgsm/functions/command_details.sh
  33. 10
      lgsm/functions/command_dev_clear_modules.sh
  34. 2
      lgsm/functions/command_dev_debug.sh
  35. 2
      lgsm/functions/command_dev_detect_deps.sh
  36. 2
      lgsm/functions/command_dev_detect_glibc.sh
  37. 2
      lgsm/functions/command_dev_detect_ldd.sh
  38. 8
      lgsm/functions/command_dev_query_raw.sh
  39. 2
      lgsm/functions/command_fastdl.sh
  40. 4
      lgsm/functions/command_install.sh
  41. 2
      lgsm/functions/command_install_resources_mta.sh
  42. 2
      lgsm/functions/command_mods_install.sh
  43. 2
      lgsm/functions/command_mods_remove.sh
  44. 2
      lgsm/functions/command_mods_update.sh
  45. 8
      lgsm/functions/command_monitor.sh
  46. 4
      lgsm/functions/command_postdetails.sh
  47. 2
      lgsm/functions/command_restart.sh
  48. 2
      lgsm/functions/command_send.sh
  49. 2
      lgsm/functions/command_skeleton.sh
  50. 12
      lgsm/functions/command_sponsor.sh
  51. 2
      lgsm/functions/command_start.sh
  52. 2
      lgsm/functions/command_stop.sh
  53. 2
      lgsm/functions/command_test_alert.sh
  54. 2
      lgsm/functions/command_ts3_server_pass.sh
  55. 2
      lgsm/functions/command_update.sh
  56. 48
      lgsm/functions/command_update_linuxgsm.sh
  57. 2
      lgsm/functions/command_validate.sh
  58. 2
      lgsm/functions/command_wipe.sh
  59. 2
      lgsm/functions/compress_unreal2_maps.sh
  60. 2
      lgsm/functions/compress_ut99_maps.sh
  61. 32
      lgsm/functions/core_dl.sh
  62. 18
      lgsm/functions/core_exit.sh
  63. 806
      lgsm/functions/core_functions.sh
  64. 12
      lgsm/functions/core_getopt.sh
  65. 6
      lgsm/functions/core_github.sh
  66. 2
      lgsm/functions/core_legacy.sh
  67. 2
      lgsm/functions/core_logs.sh
  68. 2
      lgsm/functions/core_messages.sh
  69. 806
      lgsm/functions/core_modules.sh
  70. 4
      lgsm/functions/core_steamcmd.sh
  71. 2
      lgsm/functions/core_trap.sh
  72. 6
      lgsm/functions/fix.sh
  73. 2
      lgsm/functions/fix_ark.sh
  74. 2
      lgsm/functions/fix_arma3.sh
  75. 2
      lgsm/functions/fix_av.sh
  76. 2
      lgsm/functions/fix_bo.sh
  77. 2
      lgsm/functions/fix_cmw.sh
  78. 2
      lgsm/functions/fix_csgo.sh
  79. 2
      lgsm/functions/fix_dst.sh
  80. 2
      lgsm/functions/fix_hw.sh
  81. 2
      lgsm/functions/fix_ins.sh
  82. 2
      lgsm/functions/fix_kf.sh
  83. 2
      lgsm/functions/fix_kf2.sh
  84. 4
      lgsm/functions/fix_lo.sh
  85. 2
      lgsm/functions/fix_mcb.sh
  86. 2
      lgsm/functions/fix_mta.sh
  87. 2
      lgsm/functions/fix_nmrih.sh
  88. 2
      lgsm/functions/fix_onset.sh
  89. 2
      lgsm/functions/fix_ro.sh
  90. 2
      lgsm/functions/fix_rust.sh
  91. 2
      lgsm/functions/fix_rw.sh
  92. 2
      lgsm/functions/fix_samp.sh
  93. 2
      lgsm/functions/fix_sdtd.sh
  94. 2
      lgsm/functions/fix_sfc.sh
  95. 2
      lgsm/functions/fix_sof2.sh
  96. 2
      lgsm/functions/fix_squad.sh
  97. 2
      lgsm/functions/fix_st.sh
  98. 2
      lgsm/functions/fix_steamcmd.sh
  99. 2
      lgsm/functions/fix_terraria.sh
  100. 2
      lgsm/functions/fix_tf2.sh

4
lgsm/functions/README.md

@ -3,10 +3,10 @@
These modules are scripts that are called upon by the primary script linuxgsm.sh
## Module Names
Modules have been named to give an idea of what the function does.
Modules have been named to give an idea of what the module does.
* core: Essential modules that will always run first.
* command: Primary command function.
* command: Primary command module.
* check: Runs checks that will either halt on or fix an issue.
* dev: development modules.
* fix: Applies a game server specific fix.

4
lgsm/functions/alert.sh

@ -3,9 +3,9 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Overall function for managing alerts.
# Description: Overall module for managing alerts.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Generates alert log of the details at the time of the alert.
# Used with email alerts.

2
lgsm/functions/alert_discord.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Discord alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if ! command -v jq > /dev/null; then
fn_print_fail_nl "Sending Discord alert: jq is missing."

2
lgsm/functions/alert_email.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends email alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Sending Email alert: ${email}"
fn_sleep_time

2
lgsm/functions/alert_ifttt.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends IFTTT alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(cat <<EOF
{

2
lgsm/functions/alert_mailgun.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Mailgun Email alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${mailgunapiregion}" == "eu" ]; then
mailgunapiurl="https://api.eu.mailgun.net"

2
lgsm/functions/alert_pushbullet.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Pushbullet Messenger alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(cat <<EOF
{

2
lgsm/functions/alert_pushover.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Pushover alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Sending Pushover alert"

2
lgsm/functions/alert_rocketchat.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Rocketchat alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if ! command -v jq > /dev/null; then
fn_print_fail_nl "Sending Rocketchat alert: jq is missing."

2
lgsm/functions/alert_slack.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Slack alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if ! command -v jq > /dev/null; then
fn_print_fail_nl "Sending Slack alert: jq is missing."

2
lgsm/functions/alert_telegram.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Telegram Messenger alert.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(cat <<EOF
{

4
lgsm/functions/check.sh

@ -3,10 +3,10 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Overall function for managing checks.
# Description: Overall module for managing checks.
# Runs checks that will either halt on or fix an issue.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Every command that requires checks just references check.sh.
# check.sh selects which checks to run by using arrays.

2
lgsm/functions/check_config.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if the server config is missing and warns the user if needed.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -n "${servercfgfullpath}" ]&&[ ! -f "${servercfgfullpath}" ]; then
fn_print_dots ""

2
lgsm/functions/check_deps.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if required dependencies are installed for LinuxGSM.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_mono_repo(){
if [ "${monostatus}" != "0" ]; then

2
lgsm/functions/check_executable.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if server executable exists.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if executable exists
if [ ! -f "${executabledir}/${execname}" ]; then

2
lgsm/functions/check_glibc.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if the server has the correct Glibc version.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh

2
lgsm/functions/check_ip.sh

@ -6,7 +6,7 @@
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0".
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_game.sh

2
lgsm/functions/check_last_update.sh

@ -6,7 +6,7 @@
# Description: Checks lock file to see when last update happened.
# Will reboot server if instance not rebooted since update.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then
laststart=$(cat "${lockdir}/${selfname}-laststart.lock")

2
lgsm/functions/check_logs.sh

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

18
lgsm/functions/check_permissions.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks ownership & permissions of scripts, files and directories.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_ownership(){
if [ -f "${rootdir}/${selfname}" ]; then
@ -13,8 +13,8 @@ fn_check_ownership(){
selfownissue=1
fi
fi
if [ -d "${functionsdir}" ]; then
if [ "$(find "${functionsdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then
if [ -d "${modulesdir}" ]; then
if [ "$(find "${modulesdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then
funcownissue=1
fi
fi
@ -34,7 +34,7 @@ fn_check_ownership(){
find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n"
fi
if [ "${funcownissue}" == "1" ]; then
find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n"
find "${modulesdir}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n"
fi
if [ "${filesownissue}" == "1" ]; then
find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n"
@ -53,15 +53,15 @@ fn_check_ownership(){
}
fn_check_permissions(){
if [ -d "${functionsdir}" ]; then
if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then
if [ -d "${modulesdir}" ]; then
if [ "$(find "${modulesdir}" -type f -not -executable | wc -l)" -ne "0" ]; then
fn_print_fail_nl "Permissions issues found"
fn_script_log_fatal "Permissions issues found"
fn_print_information_nl "The following files are not executable:"
fn_script_log_info "The following files are not executable:"
{
echo -e "File\n"
find "${functionsdir}" -type f -not -executable -printf "%p\n"
find "${modulesdir}" -type f -not -executable -printf "%p\n"
} | column -s $'\t' -t | tee -a "${lgsmlog}"
if [ "${monitorflag}" == 1 ]; then
alert="permissions"
@ -141,7 +141,7 @@ fn_check_permissions(){
fi
}
## The following fn_sys_perm_* functions checks for permission errors in /sys directory.
## The following fn_sys_perm_* modules checks for permission errors in /sys directory.
# Checks for permission errors in /sys directory.
fn_sys_perm_errors_detect(){
@ -223,7 +223,7 @@ fn_sys_perm_error_process(){
fi
}
# Run perm error detect & fix/alert functions on /sys directories.
# Run perm error detect & fix/alert modules on /sys directories.
## Run checks.
if [ "$(whoami)" != "root" ]; then

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.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "$(whoami)" = "root" ]; then
if [ "${commandname}" != "INSTALL" ]; then

2
lgsm/functions/check_status.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Checks the process status of the server. Either online or offline.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${sessionname}")

2
lgsm/functions/check_steamcmd.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if SteamCMD is installed correctly.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# init steamcmd functions
core_steamcmd.sh

2
lgsm/functions/check_system_dir.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if systemdir/serverfiles is accessible.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${commandname}" != "VALIDATE" ]; then
checkdir="${serverfiles}"

2
lgsm/functions/check_system_requirements.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks RAM requirements.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh

2
lgsm/functions/check_tmuxception.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if run from tmux or screen.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_is_in_tmux(){
if [ "${TMUX}" ]; then

2
lgsm/functions/check_version.sh

@ -6,7 +6,7 @@
# Description: Will run update-lgsm if gameserver.sh and modules version does not match
# this will allow gameserver.sh to update - useful for multi instance servers.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modulesversion}" ]; then
exitbypass=1

2
lgsm/functions/command_backup.sh

@ -7,7 +7,7 @@
commandname="BACKUP"
commandaction="Backing up"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_check_update.sh

@ -7,7 +7,7 @@
commandname="CHECK-UPDATE"
commandaction="check for Update"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots ""

2
lgsm/functions/command_console.sh

@ -7,7 +7,7 @@
commandname="CONSOLE"
commandaction="Access console"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_debug.sh

@ -7,7 +7,7 @@
commandname="DEBUG"
commandaction="Debuging"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Trap to remove lockfile on quit.

2
lgsm/functions/command_details.sh

@ -7,7 +7,7 @@
commandname="DETAILS"
commandaction="Viewing details"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Run checks and gathers details to display.

10
lgsm/functions/command_dev_clear_functions.sh → lgsm/functions/command_dev_clear_modules.sh

@ -1,21 +1,21 @@
#!/bin/bash
# LinuxGSM command_dev_clear_functions.sh module
# LinuxGSM command_dev_clear_modules.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Deletes the contents of the functions dir.
# Description: Deletes the contents of the modules dir.
commandname="DEV-CLEAR-MODULES"
commandaction="Clearing modules"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="
echo -e "Clear Functions"
echo -e "================================="
echo -e ""
if fn_prompt_yn "Do you want to delete all functions?" Y; then
rm -rfv "${functionsdir:?}/"*
if fn_prompt_yn "Do you want to delete all modules?" Y; then
rm -rfv "${modulesdir:?}/"*
rm -rfv "${configdirdefault:?}/"*
fn_script_log_info "Cleared modules directory"
fn_script_log_info "Cleared default config directory"

2
lgsm/functions/command_dev_debug.sh

@ -7,7 +7,7 @@
commandname="DEV-DEBUG"
commandaction="Developer debug"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_reset
if [ -f "${rootdir}/.dev-debug" ]; then

2
lgsm/functions/command_dev_detect_deps.sh

@ -7,7 +7,7 @@
commandname="DEV-DETECT-DEPS"
commandaction="Developer detect deps"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="

2
lgsm/functions/command_dev_detect_glibc.sh

@ -8,7 +8,7 @@
commandname="DEV-DETECT-GLIBC"
commandaction="Developer detect glibc"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="

2
lgsm/functions/command_dev_detect_ldd.sh

@ -8,7 +8,7 @@
commandname="DEV-DETECT-LDD"
commandaction="Developer detect ldd"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="

8
lgsm/functions/command_dev_query_raw.sh

@ -7,7 +7,7 @@
commandname="DEV-QUERY-RAW"
commandaction="Developer query raw"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@ -230,10 +230,10 @@ echo -e ""
for queryip in "${queryips[@]}"; do
echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\""
echo -e ""
if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash"
if [ ! -f "${modulesdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash"
fi
"${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}"
"${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}"
done
echo -e ""
echo -e "${lightgreen}TCP Raw Output${default}"

2
lgsm/functions/command_fastdl.sh

@ -7,7 +7,7 @@
commandname="FASTDL"
commandaction="Fastdl"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

4
lgsm/functions/command_install.sh

@ -3,11 +3,11 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Overall function for the installer.
# Description: Overall module for the installer.
commandname="INSTALL"
commandaction="Installing"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_install_resources_mta.sh

@ -7,7 +7,7 @@
commandname="DEFAULT-RESOURCES"
commandaction="Default Resources"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_install_resources(){

2
lgsm/functions/command_mods_install.sh

@ -7,7 +7,7 @@
commandname="MODS-INSTALL"
commandaction="Installing mods"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_mods_remove.sh

@ -7,7 +7,7 @@
commandname="MODS-REMOVE"
commandaction="Removing mods"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_mods_update.sh

@ -7,7 +7,7 @@
commandname="MODS-UPDATE"
commandaction="Updating mods"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

8
lgsm/functions/command_monitor.sh

@ -8,7 +8,7 @@
commandname="MONITOR"
commandaction="Monitoring"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_monitor_check_lockfile(){
@ -84,10 +84,10 @@ fn_monitor_check_queryport(){
}
fn_query_gsquery(){
if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash"
if [ ! -f "${modulesdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash"
fi
"${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
"${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
querystatus="$?"
}

4
lgsm/functions/command_postdetails.sh

@ -7,12 +7,12 @@
commandname="POST-DETAILS"
commandaction="Posting details"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
posttarget="https://termbin.com"
# source all of the functions defined in the details command.
# source all of the modules defined in the details command.
info_messages.sh
fn_bad_postdetailslog() {

2
lgsm/functions/command_restart.sh

@ -7,7 +7,7 @@
commandname="MODS-INSTALL"
commandaction="Restarting"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
info_game.sh

2
lgsm/functions/command_send.sh

@ -7,7 +7,7 @@
commandname="SEND"
commandaction="Send"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/command_skeleton.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates an copy of a game servers directorys.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Creating skeleton directory"
check.sh

12
lgsm/functions/command_donate.sh → lgsm/functions/command_sponsor.sh

@ -1,13 +1,13 @@
#!/bin/bash
# LinuxGSM command_donate.sh module
# LinuxGSM command_sponsor.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Shows ways to donate.
# Description: Shows ways to sponsor.
commandname="DONATE"
commandaction="Donate"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
commandname="SPONSOR"
commandaction="Sponsor"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_ascii_logo
@ -15,7 +15,7 @@ echo -e "${lightyellow}Support LinuxGSM${default}"
echo -e "================================="
echo -e ""
echo -e "Been using LinuxGSM?"
echo -e "Consider donating to support development."
echo -e "Consider sponsoring to support development."
echo -e ""
echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon"
echo -e "* ${lightblue}GitHub:${default} https://github.com/sponsors/dgibbs64"

2
lgsm/functions/command_start.sh

@ -7,7 +7,7 @@
commandname="START"
commandaction="Starting"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_start_teamspeak3(){

2
lgsm/functions/command_stop.sh

@ -7,7 +7,7 @@
commandname="STOP"
commandaction="Stopping"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Attempts graceful shutdown by sending 'CTRL+c'.

2
lgsm/functions/command_test_alert.sh

@ -7,7 +7,7 @@
commandname="TEST-ALERT"
commandaction="Sending Alert"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots "${servername}"

2
lgsm/functions/command_ts3_server_pass.sh

@ -7,7 +7,7 @@
commandname="CHANGE-PASSWORD"
commandaction="Changing password"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_serveradmin_password_prompt(){

2
lgsm/functions/command_update.sh

@ -7,7 +7,7 @@
commandname="UPDATE"
commandaction="Updating"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots ""

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

2
lgsm/functions/command_validate.sh

@ -7,7 +7,7 @@
commandname="VALIDATE"
commandaction="Validating"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_validate(){

2
lgsm/functions/command_wipe.sh

@ -7,7 +7,7 @@
commandname="WIPE"
commandaction="Wiping"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Provides an exit code upon error.

2
lgsm/functions/compress_unreal2_maps.sh

@ -7,7 +7,7 @@
commandname="MAP-COMPRESSOR"
commandaction="Compressing maps"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

2
lgsm/functions/compress_ut99_maps.sh

@ -7,7 +7,7 @@
commandname="MAP-COMPRESSOR"
commandaction="Compressing maps"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh

32
lgsm/functions/core_dl.sh

@ -17,7 +17,7 @@
# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
# fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_dl_steamcmd(){
fn_print_start_nl "${remotelocation}"
@ -358,10 +358,10 @@ fn_fetch_file(){
fi
}
# GitHub file download functions.
# GitHub file download modules.
# Used to simplify downloading specific files from GitHub.
# github_file_url_dir: the directory of the file in the GitHub: lgsm/functions
# 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
# githuburl: the full GitHub url
@ -397,7 +397,7 @@ fn_fetch_file_github(){
run="${5:-0}"
forcedl="${6:-0}"
hash="${7:-0}"
# Passes vars to the file download function.
# Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
@ -421,14 +421,14 @@ fn_fetch_config(){
run="norun"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download function.
# Passes vars to the file download module.
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_function(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
fn_fetch_module(){
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
@ -439,20 +439,20 @@ fn_fetch_function(){
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${functionsdir}"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
chmodx="chmodx"
run="run"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download function.
# Passes vars to the file download module.
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_function(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
fn_update_module(){
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
@ -463,13 +463,13 @@ fn_update_function(){
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${functionsdir}"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
chmodx="chmodx"
run="norun"
forcedl="noforce"
hash="nohash"
# Passes vars to the file download function.
# Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
@ -508,7 +508,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 function to the ${tmpdir} for now.
# Fetch file from the remote location from the existing module 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.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_dev_debug(){
if [ -f "${rootdir}/.dev-debug" ]; then
echo -e ""
echo -e "${functionselfname} exiting with code: ${exitcode}"
echo -e "${moduleselfname} exiting with code: ${exitcode}"
if [ -f "${rootdir}/dev-debug.log" ]; then
grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log"
grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
fi
fi
}
@ -29,13 +29,13 @@ elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
if [ "${exitcode}" == "1" ]; then
fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}"
fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "2" ]; then
fn_script_log_error "${functionselfname} exiting with code: ${exitcode}"
fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "3" ]; then
fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
else
fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
fi
fn_exit_dev_debug
# remove trap.
@ -44,7 +44,7 @@ elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
elif [ "${exitcode}" ]&&[ "${exitcode}" == "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}"
fn_script_log_pass "${moduleselfname} 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 "${functionselfname} exiting with code: NOT SET"
fn_script_log_pass "${moduleselfname} exiting with code: NOT SET"
fn_exit_dev_debug
# remove trap.
trap - INT

806
lgsm/functions/core_functions.sh

@ -1,806 +0,0 @@
#!/bin/bash
# LinuxGSM core_functions.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# 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.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v21.2.5"
# Core
core_dl.sh(){
functionfile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_messages.sh(){
functionfile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_legacy.sh(){
functionfile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_exit.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
core_getopt.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
core_trap.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
core_steamcmd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
core_github.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Commands
command_backup.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_console.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_debug.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_details.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_donate.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_postdetails.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_test_alert.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_monitor.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_start.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_stop.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_validate.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_install.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_install_resources_mta.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_squad_license.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_mods_install.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_mods_update.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_mods_remove.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_fastdl.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_ts3_server_pass.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_restart.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_skeleton.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_wipe.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_send.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Checks
check.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_config.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_deps.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_executable.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_glibc.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_ip.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_last_update.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_logs.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_permissions.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_root.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_status.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_steamcmd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_system_dir.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_system_requirements.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_tmuxception.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
check_version.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Compress
compress_unreal2_maps.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
compress_ut99_maps.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Mods
mods_list.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
mods_core.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Dev
command_dev_clear_functions.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_dev_debug.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_dev_detect_deps.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_dev_detect_glibc.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_dev_detect_ldd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_dev_query_raw.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Fix
fix.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ark.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_av.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_arma3.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_bo.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_cmw.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_csgo.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_dst.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_hw.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ins.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_kf.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_kf2.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_lo.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_mcb.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_mta.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_nmrih.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_onset.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ro.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_rust.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_rw.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_sfc.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_st.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_steamcmd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_terraria.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_tf2.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ut3.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_rust.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_samp.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_sdtd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_sof2.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_squad.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ts3.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ut2k4.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ut.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_unt.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_vh.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_wurm.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_zmr.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Info
info_distro.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
info_game.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
info_gamedig.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
info_messages.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
info_stats.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Alert
alert.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_discord.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_email.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_ifttt.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_mailgun.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_pushbullet.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_pushover.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_telegram.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_rocketchat.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
alert_slack.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Logs
core_logs.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Query
query_gamedig.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Update
command_update_functions.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_update_linuxgsm.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_update.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
command_check_update.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_ts3.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_minecraft.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_minecraft_bedrock.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_papermc.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_mumble.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_mta.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_factorio.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_jediknight2.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_steamcmd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
update_vintagestory.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fn_update_functions.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
#
## Installer functions
#
fn_autoinstall(){
autoinstall=1
command_install.sh
}
install_complete.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_config.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_factorio_save.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_dst_token.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_eula.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_gsquery.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_gslt.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_header.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_logs.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_retry.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_server_dir.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_server_files.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_stats.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_steamcmd.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_ts3.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_ts3db.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_ut2k4.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_dl_ut2k4.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
install_ut2k4_key.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
# Calls code required for legacy servers
core_legacy.sh
# Creates tmp dir if missing
if [ ! -d "${tmpdir}" ]; then
mkdir -p "${tmpdir}"
fi
# Creates lock dir if missing
if [ ! -d "${lockdir}" ]; then
mkdir -p "${lockdir}"
fi
# Calls on-screen messages (bootstrap)
core_messages.sh
#Calls file downloader (bootstrap)
core_dl.sh
# Calls the global Ctrl-C trap
core_trap.sh

12
lgsm/functions/core_getopt.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: getopt arguments.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(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-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." )
cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-modules" "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_donate=( "do;donate" "command_donate.sh" "Donation options." )
cmd_sponsor=( "do;sponsor" "command_sponsor.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 requ
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_functions=( "cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir." )
cmd_dev_clear_modules=( "cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir." )
### Set specific opt here.
@ -144,11 +144,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_functions[@]}" )
currentopt+=( "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}" )
fi
## Donate.
currentopt+=( "${cmd_donate[@]}" )
currentopt+=( "${cmd_sponsor[@]}" )
### Build list of available commands.
optcommands=()

6
lgsm/functions/core_github.sh

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

2
lgsm/functions/core_legacy.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Code for backwards compatability with older versions of LinuxGSM.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(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 )

2
lgsm/functions/core_logs.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Acts as a log rotator, removing old logs.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(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.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(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.

806
lgsm/functions/core_modules.sh

@ -0,0 +1,806 @@
#!/bin/bash
# LinuxGSM core_modules.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Defines all modules to allow download and execution of modules using fn_fetch_module.
# This module is called first before any other module. Without this file other modules will not load.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v21.2.5"
# Core
core_dl.sh(){
modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_messages.sh(){
modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_legacy.sh(){
modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
fi
}
core_exit.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
core_getopt.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
core_trap.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
core_steamcmd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
core_github.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Commands
command_backup.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_console.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_debug.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_details.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_sponsor.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_postdetails.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_test_alert.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_monitor.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_start.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_stop.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_validate.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_install.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_install_resources_mta.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_squad_license.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_mods_install.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_mods_update.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_mods_remove.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_fastdl.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_ts3_server_pass.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_restart.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_skeleton.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_wipe.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_send.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Checks
check.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_config.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_deps.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_executable.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_glibc.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_ip.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_last_update.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_logs.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_permissions.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_root.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_status.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_steamcmd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_system_dir.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_system_requirements.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_tmuxception.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
check_version.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Compress
compress_unreal2_maps.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
compress_ut99_maps.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Mods
mods_list.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
mods_core.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Dev
command_dev_clear_modules.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_dev_debug.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_dev_detect_deps.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_dev_detect_glibc.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_dev_detect_ldd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_dev_query_raw.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Fix
fix.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ark.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_av.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_arma3.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_bo.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_cmw.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_csgo.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_dst.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_hw.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ins.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_kf.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_kf2.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_lo.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_mcb.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_mta.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_nmrih.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_onset.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ro.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_rust.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_rw.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_sfc.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_st.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_steamcmd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_terraria.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_tf2.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ut3.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_rust.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_samp.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_sdtd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_sof2.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_squad.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ts3.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ut2k4.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_ut.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_unt.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_vh.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_wurm.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fix_zmr.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Info
info_distro.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
info_game.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
info_gamedig.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
info_messages.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
info_stats.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Alert
alert.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_discord.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_email.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_ifttt.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_mailgun.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_pushbullet.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_pushover.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_telegram.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_rocketchat.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
alert_slack.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Logs
core_logs.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Query
query_gamedig.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Update
command_update_modules.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_update_linuxgsm.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_update.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
command_check_update.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_ts3.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_minecraft.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_minecraft_bedrock.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_papermc.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_mumble.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_mta.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_factorio.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_jediknight2.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_steamcmd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
update_vintagestory.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
fn_update_modules.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
#
## Installer modules
#
fn_autoinstall(){
autoinstall=1
command_install.sh
}
install_complete.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_config.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_factorio_save.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_dst_token.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_eula.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_gsquery.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_gslt.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_header.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_logs.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_retry.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_server_dir.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_server_files.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_stats.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_steamcmd.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_ts3.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_ts3db.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_ut2k4.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_dl_ut2k4.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_ut2k4_key.sh(){
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
# Calls code required for legacy servers
core_legacy.sh
# Creates tmp dir if missing
if [ ! -d "${tmpdir}" ]; then
mkdir -p "${tmpdir}"
fi
# Creates lock dir if missing
if [ ! -d "${lockdir}" ]; then
mkdir -p "${lockdir}"
fi
# Calls on-screen messages (bootstrap)
core_messages.sh
#Calls file downloader (bootstrap)
core_dl.sh
# Calls the global Ctrl-C trap
core_trap.sh

4
lgsm/functions/core_steamcmd.sh

@ -3,9 +3,9 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Core functions for SteamCMD
# Description: Core modules for SteamCMD
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(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.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_trap(){
if [ -z "${exitcode}" ]; then

6
lgsm/functions/fix.sh

@ -3,10 +3,10 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Overall function for managing fixes.
# Runs functions that will fix an issue.
# Description: Overall module for managing fixes.
# Runs modules that will fix an issue.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Messages that are displayed for some fixes.
fn_fix_msg_start(){

2
lgsm/functions/fix_ark.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with ARK: Survival Evolved.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# removes mulitple appworkshop_346110.acf if found.
steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)"

2
lgsm/functions/fix_arma3.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with ARMA3.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: 20150 Segmentation fault (core dumped) error.
if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ]||[ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then

2
lgsm/functions/fix_av.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Avorion
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"

2
lgsm/functions/fix_bo.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Ballistic Overkill.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64"

2
lgsm/functions/fix_cmw.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves the issue of the not starting server on linux
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${executabledir}/steam_appid.txt" ]; then
fixname="steam_appid.txt"

2
lgsm/functions/fix_csgo.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with CS:GO.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: server not always creating steam_appid.txt file.
if [ ! -f "${serverfiles}/steam_appid.txt" ]; then

2
lgsm/functions/fix_dst.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Don't Starve Together.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer).
# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.

2
lgsm/functions/fix_hw.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Hurtworld.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64"

2
lgsm/functions/fix_ins.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Insurgency.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory.

2
lgsm/functions/fix_kf.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"

2
lgsm/functions/fix_kf2.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor 2.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\""

4
lgsm/functions/fix_lo.sh

@ -1,10 +1,10 @@
#!/bin/bash
# LinuxGSM fix_lo.sh function
# LinuxGSM fix_lo.sh module
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Resolves installation issue with Last Oasis
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
local APPID_FILE=${executabledir}/steam_appid.txt
if [ ! -f "${APPID_FILE}" ]; then

2
lgsm/functions/fix_mcb.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves possible startup issue with Minecraft Bedrock.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"

2
lgsm/functions/fix_mta.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Installs the libmysqlclient for database functions on the server.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then
fixname="libmysqlclient16"

2
lgsm/functions/fix_nmrih.sh

@ -6,7 +6,7 @@
# Description: Create symlinks for renamed No More Room In Hell serverfiles.
# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so"
ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so"

2
lgsm/functions/fix_onset.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Onset.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"

2
lgsm/functions/fix_ro.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Red Orchestra.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"

2
lgsm/functions/fix_rust.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Rust.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: [Raknet] Server Shutting Down (Shutting Down).
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedicated_Data/Plugins/x86_64"

2
lgsm/functions/fix_rw.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Rising World.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"

2
lgsm/functions/fix_samp.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves issue that the default rcon password is not changed
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${servercfgfullpath}" ]; then
# check if default password is set "changeme"

2
lgsm/functions/fix_sdtd.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with 7 Days to Die.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}/7DaysToDieServer_Data/Plugins/x86_64"

2
lgsm/functions/fix_sfc.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Source Forts Classic.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${serverfiles}/bin/datacache.so" ]; then
ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so"

2
lgsm/functions/fix_sof2.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Soldier of Fortune 2.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: error while loading shared libraries: libcxa.so.1
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"

2
lgsm/functions/fix_squad.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Squad.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# As the server base dir changed for the game, we need to migrate the default config from the old to the new location
oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}"

2
lgsm/functions/fix_st.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Stationeers.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: [Raknet] Server Shutting Down (Shutting Down).
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64"

2
lgsm/functions/fix_steamcmd.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues related to SteamCMD.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# function to simplify the steamclient.so fix
# example

2
lgsm/functions/fix_terraria.sh

@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with Terraria.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export TERM=xterm

2
lgsm/functions/fix_tf2.sh

@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Team Fortress 2.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062.
if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save