Explorar el Código

Revert "SC2168: 'local' is only valid in functions."

This reverts commit aaa971c0adb8308fd9c6677404ccb121f2c91cae.
Daniel Gibbs hace 7 años
padre
commit
616e976251
Se han modificado 93 ficheros con 171 adiciones y 171 borrados
  1. 2 2
      lgsm/functions/alert.sh
  2. 2 2
      lgsm/functions/alert_email.sh
  3. 2 2
      lgsm/functions/alert_ifttt.sh
  4. 2 2
      lgsm/functions/alert_mailgun.sh
  5. 2 2
      lgsm/functions/alert_pushbullet.sh
  6. 2 2
      lgsm/functions/alert_pushover.sh
  7. 2 2
      lgsm/functions/alert_telegram.sh
  8. 1 1
      lgsm/functions/check.sh
  9. 1 1
      lgsm/functions/check_config.sh
  10. 1 1
      lgsm/functions/check_deps.sh
  11. 1 1
      lgsm/functions/check_executable.sh
  12. 1 1
      lgsm/functions/check_glibc.sh
  13. 1 1
      lgsm/functions/check_ip.sh
  14. 1 1
      lgsm/functions/check_logs.sh
  15. 1 1
      lgsm/functions/check_permissions.sh
  16. 1 1
      lgsm/functions/check_root.sh
  17. 1 1
      lgsm/functions/check_status.sh
  18. 1 1
      lgsm/functions/check_steamcmd.sh
  19. 2 2
      lgsm/functions/check_system_dir.sh
  20. 1 1
      lgsm/functions/check_system_requirements.sh
  21. 1 1
      lgsm/functions/check_tmuxception.sh
  22. 2 2
      lgsm/functions/command_backup.sh
  23. 2 2
      lgsm/functions/command_console.sh
  24. 2 2
      lgsm/functions/command_debug.sh
  25. 2 2
      lgsm/functions/command_details.sh
  26. 2 2
      lgsm/functions/command_dev_debug.sh
  27. 2 2
      lgsm/functions/command_dev_detect_deps.sh
  28. 2 2
      lgsm/functions/command_dev_detect_glibc.sh
  29. 2 2
      lgsm/functions/command_dev_detect_ldd.sh
  30. 2 2
      lgsm/functions/command_dev_query_raw.sh
  31. 2 2
      lgsm/functions/command_fastdl.sh
  32. 2 2
      lgsm/functions/command_install.sh
  33. 2 2
      lgsm/functions/command_install_resources_mta.sh
  34. 2 2
      lgsm/functions/command_mods_install.sh
  35. 2 2
      lgsm/functions/command_mods_remove.sh
  36. 2 2
      lgsm/functions/command_mods_update.sh
  37. 2 2
      lgsm/functions/command_monitor.sh
  38. 2 2
      lgsm/functions/command_postdetails.sh
  39. 2 2
      lgsm/functions/command_restart.sh
  40. 2 2
      lgsm/functions/command_start.sh
  41. 2 2
      lgsm/functions/command_stop.sh
  42. 2 2
      lgsm/functions/command_test_alert.sh
  43. 2 2
      lgsm/functions/command_ts3_server_pass.sh
  44. 2 2
      lgsm/functions/command_update.sh
  45. 2 2
      lgsm/functions/command_update_linuxgsm.sh
  46. 2 2
      lgsm/functions/command_validate.sh
  47. 2 2
      lgsm/functions/command_wipe.sh
  48. 1 1
      lgsm/functions/compress_unreal2_maps.sh
  49. 1 1
      lgsm/functions/compress_ut99_maps.sh
  50. 2 2
      lgsm/functions/core_dl.sh
  51. 2 2
      lgsm/functions/fix.sh
  52. 2 2
      lgsm/functions/fix_arma3.sh
  53. 2 2
      lgsm/functions/fix_coduo.sh
  54. 2 2
      lgsm/functions/fix_csgo.sh
  55. 2 2
      lgsm/functions/fix_dst.sh
  56. 2 2
      lgsm/functions/fix_ges.sh
  57. 2 2
      lgsm/functions/fix_glibc.sh
  58. 2 2
      lgsm/functions/fix_ins.sh
  59. 2 2
      lgsm/functions/fix_kf.sh
  60. 2 2
      lgsm/functions/fix_kf2.sh
  61. 2 2
      lgsm/functions/fix_mta.sh
  62. 2 2
      lgsm/functions/fix_ro.sh
  63. 2 2
      lgsm/functions/fix_rust.sh
  64. 2 2
      lgsm/functions/fix_rw.sh
  65. 2 2
      lgsm/functions/fix_ss3.sh
  66. 2 2
      lgsm/functions/fix_steamcmd.sh
  67. 2 2
      lgsm/functions/fix_ut.sh
  68. 2 2
      lgsm/functions/fix_ut2k4.sh
  69. 2 2
      lgsm/functions/fix_ut3.sh
  70. 2 2
      lgsm/functions/install_complete.sh
  71. 2 2
      lgsm/functions/install_config.sh
  72. 2 2
      lgsm/functions/install_dst_token.sh
  73. 2 2
      lgsm/functions/install_factorio_save.sh
  74. 2 2
      lgsm/functions/install_gslt.sh
  75. 2 2
      lgsm/functions/install_header.sh
  76. 2 2
      lgsm/functions/install_logs.sh
  77. 2 2
      lgsm/functions/install_mta_resources.sh
  78. 2 2
      lgsm/functions/install_retry.sh
  79. 2 2
      lgsm/functions/install_server_dir.sh
  80. 2 2
      lgsm/functions/install_server_files.sh
  81. 2 2
      lgsm/functions/install_squad_license.sh
  82. 2 2
      lgsm/functions/install_steamcmd.sh
  83. 2 2
      lgsm/functions/install_ts3db.sh
  84. 2 2
      lgsm/functions/install_ut2k4_key.sh
  85. 2 2
      lgsm/functions/logs.sh
  86. 2 2
      lgsm/functions/mods_core.sh
  87. 2 2
      lgsm/functions/mods_list.sh
  88. 2 2
      lgsm/functions/update_factorio.sh
  89. 2 2
      lgsm/functions/update_minecraft.sh
  90. 2 2
      lgsm/functions/update_mta.sh
  91. 2 2
      lgsm/functions/update_mumble.sh
  92. 2 2
      lgsm/functions/update_steamcmd.sh
  93. 2 2
      lgsm/functions/update_ts3.sh

+ 2 - 2
lgsm/functions/alert.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Overall function for managing alerts.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 
 fn_alert_log(){
 	info_distro.sh

+ 2 - 2
lgsm/functions/alert_email.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends email alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots "Sending Email alert: ${email}"

+ 2 - 2
lgsm/functions/alert_ifttt.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends IFTTT alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 json=$(cat <<EOF

+ 2 - 2
lgsm/functions/alert_mailgun.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends Mailgun Email alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots "Sending Email alert: Mailgun: ${email}"

+ 2 - 2
lgsm/functions/alert_pushbullet.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends Pushbullet Messenger alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 json=$(cat <<EOF

+ 2 - 2
lgsm/functions/alert_pushover.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends Pushover alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots "Sending Pushover alert"

+ 2 - 2
lgsm/functions/alert_telegram.sh

@@ -4,8 +4,8 @@
 # Website: https://bytegaming.de
 # Description: Sends Telegram Messenger alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 json=$(cat <<EOF

+ 1 - 1
lgsm/functions/check.sh

@@ -5,7 +5,7 @@
 # Description: Overall function for managing checks.
 # Runs checks that will either halt on or fix an issue.
 
-commandname="CHECK"
+local commandname="CHECK"
 
 # Every command that requires checks just references check.sh
 # check.sh selects which checks to run by using arrays

+ 1 - 1
lgsm/functions/check_config.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if the server config is missing and warns the user if needed.
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ ! -e "${servercfgfullpath}" ]; then

+ 1 - 1
lgsm/functions/check_deps.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if required dependencies are installed for LinuxGSM.
 
-commandname="CHECK"
+local commandname="CHECK"
 
 fn_install_mono_repo(){
 	if [ "${monostatus}" != "0" ]; then

+ 1 - 1
lgsm/functions/check_executable.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if executable exists.
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Check if executable exists

+ 1 - 1
lgsm/functions/check_glibc.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if the server has the correct Glibc version or a fix available.
 
-commandname="CHECK"
+local commandname="CHECK"
 
 info_glibc.sh
 info_distro.sh

+ 1 - 1
lgsm/functions/check_ip.sh

@@ -5,7 +5,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".
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travistest}" != "1" ]; then

+ 1 - 1
lgsm/functions/check_logs.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if log files exist.
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_check_logs(){

+ 1 - 1
lgsm/functions/check_permissions.sh

@@ -5,7 +5,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks ownership & permissions of scripts, files and directories.
 
-commandname="CHECK"
+local commandname="CHECK"
 
 fn_check_ownership(){
 	if [ -f "${rootdir}/${selfname}" ]; then

+ 1 - 1
lgsm/functions/check_root.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if the user tried to run the script as root.
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ "$(whoami)" = "root" ]; then

+ 1 - 1
lgsm/functions/check_status.sh

@@ -5,7 +5,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks the process status of the server. Either online or offline.
 
-commandname="CHECK"
+local commandname="CHECK"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ "${gamename}" == "TeamSpeak 3" ]; then

+ 1 - 1
lgsm/functions/check_steamcmd.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if SteamCMD is installed correctly.
 
-commandname="CHECK"
+local commandname="CHECK"
 
 fn_install_steamcmd(){
 	if [ ! -d "${steamcmddir}" ]; then

+ 2 - 2
lgsm/functions/check_system_dir.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Checks if systemdir/serverfiles is accessible.
 
-commandname="CHECK"
-local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+local commandname="CHECK"
+function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ "${function_selfname}" != "command_validate.sh" ]; then
 	checkdir="${serverfiles}"

+ 1 - 1
lgsm/functions/check_system_requirements.sh

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

+ 1 - 1
lgsm/functions/check_tmuxception.sh

@@ -5,7 +5,7 @@
 # Website: https://linuxgsm.com
 # Description: Checks if run from tmux or screen
 
-commandname="check"
+local commandname="check"
 
 fn_check_is_in_tmux(){
   if [ -n "${TMUX}" ]; then

+ 2 - 2
lgsm/functions/command_backup.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates a .tar.gz file in the backup directory.
 
-commandname="BACKUP"
-commandaction="Backup"
+local commandname="BACKUP"
+local commandaction="Backup"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_console.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Gives access to the server tmux console.
 
-commandname="CONSOLE"
-commandaction="Console"
+local commandname="CONSOLE"
+local commandaction="Console"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_debug.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Runs the server without tmux and directly from the terminal.
 
-commandname="DEBUG"
-commandaction="Debug"
+local commandname="DEBUG"
+local commandaction="Debug"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Trap to remove lockfile on quit.

+ 2 - 2
lgsm/functions/command_details.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Displays server information.
 
-commandname="DETAILS"
-commandaction="Details"
+local commandname="DETAILS"
+local commandaction="Details"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Run checks and gathers details to display.

+ 2 - 2
lgsm/functions/command_dev_debug.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Dev only: Enables debugging log to be saved to dev-debug.log.
 
-commandname="DEV-DEBUG"
-commandaction="Dev-Debug"
+local commandname="DEV-DEBUG"
+local commandaction="Dev-Debug"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ -f "${rootdir}/.dev-debug" ]; then

+ 2 - 2
lgsm/functions/command_dev_detect_deps.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Detects dependencies the server binary requires.
 
-commandname="DETECT-DEPS"
-commandaction="Detect-Deps"
+local commandname="DETECT-DEPS"
+local commandaction="Detect-Deps"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "================================="

+ 2 - 2
lgsm/functions/command_dev_detect_glibc.sh

@@ -5,8 +5,8 @@
 # Description: Automatically detects the version of GLIBC that is required.
 # Can check a file or directory recursively.
 
-commandname="DETECT-GLIBC"
-commandaction="Detect-Glibc"
+local commandname="DETECT-GLIBC"
+local commandaction="Detect-Glibc"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "================================="

+ 2 - 2
lgsm/functions/command_dev_detect_ldd.sh

@@ -5,8 +5,8 @@
 # Description: Automatically detects required deps using ldd.
 # Can check a file or directory recursively.
 
-commandname="DETECT-LDD"
-commandaction="Detect-LDD"
+local commandname="DETECT-LDD"
+local commandaction="Detect-LDD"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "================================="

+ 2 - 2
lgsm/functions/command_dev_query_raw.sh

@@ -4,8 +4,8 @@
 # Website: https://gameservermanagers.com
 # Description: Raw gamedig output of the server.
 
-commandname="QUERY-RAW"
-commandaction="QUERY-RAW"
+local commandname="QUERY-RAW"
+local commandaction="QUERY-RAW"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "================================="

+ 2 - 2
lgsm/functions/command_fastdl.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates a FastDL directory.
 
-commandname="FASTDL"
-commandaction="FastDL"
+local commandname="FASTDL"
+local commandaction="FastDL"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_install.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Overall function for the installer.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_install_resources_mta.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Installs the default resources for Multi Theft Auto.
 
-commandname="DEFAULT_RESOURCES"
-commandaction="Default Resources"
+local commandname="DEFAULT_RESOURCES"
+local commandaction="Default Resources"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_install_resources(){

+ 2 - 2
lgsm/functions/command_mods_install.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: List and installs available mods along with mods_list.sh and mods_core.sh.
 
-commandname="MODS"
-commandaction="addons/mods"
+local commandname="MODS"
+local commandaction="addons/mods"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_mods_remove.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Uninstall mods along with mods_list.sh and mods_core.sh.
 
-commandname="MODS"
-commandaction="addons/mods"
+local commandname="MODS"
+local commandaction="addons/mods"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_mods_update.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Updates installed mods along with mods_list.sh and mods_core.sh.
 
-commandname="MODS"
-commandaction="Mods Update"
+local commandname="MODS"
+local commandaction="Mods Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/command_monitor.sh

@@ -6,8 +6,8 @@
 # Description: Monitors server by checking for running processes.
 # then passes to gamedig and gsquery.
 
-commandname="MONITOR"
-commandaction="Monitor"
+local commandname="MONITOR"
+local commandaction="Monitor"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_monitor_loop(){

+ 2 - 2
lgsm/functions/command_postdetails.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Strips sensitive information out of Details output
 
-commandname="postdetails"
-commandaction="Postdetails"
+local commandname="postdetails"
+local commandaction="Postdetails"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Set posttarget to the appropriately-defined post destination.

+ 2 - 2
lgsm/functions/command_restart.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Restarts the server.
 
-commandname="RESTART"
-commandaction="Restarting"
+local commandname="RESTART"
+local commandaction="Restarting"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 info_config.sh

+ 2 - 2
lgsm/functions/command_start.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Starts the server.
 
-commandname="START"
-commandaction="Starting"
+local commandname="START"
+local commandaction="Starting"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_start_teamspeak3(){

+ 2 - 2
lgsm/functions/command_stop.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Stops the server.
 
-commandname="STOP"
-commandaction="Stopping"
+local commandname="STOP"
+local commandaction="Stopping"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Attempts graceful shutdown by sending the 'CTRL+c'.

+ 2 - 2
lgsm/functions/command_test_alert.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Sends a test alert.
 
-commandname="ALERT"
-commandaction="Alert"
+local commandname="ALERT"
+local commandaction="Alert"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots "${servername}"

+ 2 - 2
lgsm/functions/command_ts3_server_pass.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Changes TS3 serveradmin password.
 
-commandname="TS3-CHANGE-PASS"
-commandaction="ServerAdmin Password Change"
+local commandname="TS3-CHANGE-PASS"
+local commandaction="ServerAdmin Password Change"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_serveradmin_password_prompt(){

+ 2 - 2
lgsm/functions/command_update.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots ""

+ 2 - 2
lgsm/functions/command_update_linuxgsm.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
 
-commandname="UPDATE LinuxGSM"
-commandaction="Update LinuxGSM"
+local commandname="UPDATE LinuxGSM"
+local commandaction="Update LinuxGSM"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_dots "Updating LinuxGSM"

+ 2 - 2
lgsm/functions/command_validate.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Runs a server validation.
 
-commandname="VALIDATE"
-commandaction="Validate"
+local commandname="VALIDATE"
+local commandaction="Validate"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_validation(){

+ 2 - 2
lgsm/functions/command_wipe.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Wipes server data, useful after updates for some games like Rust
 
-commandname="WIPE"
-commandaction="data wipe"
+local commandname="WIPE"
+local commandaction="data wipe"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 1 - 1
lgsm/functions/compress_unreal2_maps.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Compresses unreal maps.
 
-commandaction="Unreal Map Compressor"
+local commandaction="Unreal Map Compressor"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 1 - 1
lgsm/functions/compress_ut99_maps.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Compresses unreal maps.
 
-commandaction="Unreal Map Compressor"
+local commandaction="Unreal Map Compressor"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/core_dl.sh

@@ -17,8 +17,8 @@
 # fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
 # fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd"
 
-commandname="DOWNLOAD"
-commandaction="Download"
+local commandname="DOWNLOAD"
+local commandaction="Download"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_dl_md5(){

+ 2 - 2
lgsm/functions/fix.sh

@@ -5,8 +5,8 @@
 # Description: Overall function for managing fixes.
 # Runs functions that will fix an issue.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 # Messages that are displayed for some fixes
 fn_fix_msg_start(){

+ 2 - 2
lgsm/functions/fix_arma3.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves an issue with ARMA3.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Fixes: 20150 Segmentation fault (core dumped) error.

+ 2 - 2
lgsm/functions/fix_coduo.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Fixes for Call of Duty: United Offensive
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 # Force glibc fix
 fix_glibc.sh

+ 2 - 2
lgsm/functions/fix_csgo.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with CS:GO.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Fixes: server not always creating steam_appid.txt file.

+ 2 - 2
lgsm/functions/fix_dst.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Don't Starve Together.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(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)

+ 2 - 2
lgsm/functions/fix_ges.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with GoldenEye: Source.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 # Fixes: MALLOC_CHECK_ needing to be set to 0.
 export MALLOC_CHECK_=0

+ 2 - 2
lgsm/functions/fix_glibc.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Downloads required Glibc files and applies the Glibc fix if required.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 ## i386

+ 2 - 2
lgsm/functions/fix_ins.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Insurgency.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 # Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory.
 

+ 2 - 2
lgsm/functions/fix_kf.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Killing Floor.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "Applying WebAdmin ROOst.css fix."

+ 2 - 2
lgsm/functions/fix_kf2.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Killing Floor 2.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_parms(){

+ 2 - 2
lgsm/functions/fix_mta.sh

@@ -4,8 +4,8 @@
 # Contributor: ChaosMTA
 # Website: https://linuxgsm.com
 # Description: Installs the libmysqlclient for database functions on the server
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then

+ 2 - 2
lgsm/functions/fix_ro.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Red Orchestra.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "Applying WebAdmin ROOst.css fix."

+ 2 - 2
lgsm/functions/fix_rust.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves startup issue with Rust
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 # Fixes: [Raknet] Server Shutting Down (Shutting Down)
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${systemdir}/RustDedicated_Data/Plugins/x86_64"

+ 2 - 2
lgsm/functions/fix_rw.sh

@@ -4,7 +4,7 @@
 # Website: https://linuxgsm.com
 # Description: Resolves startup issue with Rising World
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 
 export LD_LIBRARY_PATH="${serverfiles}/linux64:${serverfiles}:$LD_LIBRARY_PATH"

+ 2 - 2
lgsm/functions/fix_ss3.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Serious Sam 3.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/

+ 2 - 2
lgsm/functions/fix_steamcmd.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues related to SteamCMD.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so.

+ 2 - 2
lgsm/functions/fix_ut.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Unreal Tournament.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 #Set Binary Executable

+ 2 - 2
lgsm/functions/fix_ut2k4.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with Unreal Tournament 2004.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "applying WebAdmin ut2003.css fix."

+ 2 - 2
lgsm/functions/fix_ut3.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Resolves various issues with configs in Unreal Tournament 3.
 
-commandname="FIX"
-commandaction="Fix"
+local commandname="FIX"
+local commandaction="Fix"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_parms(){

+ 2 - 2
lgsm/functions/install_complete.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Prints installation completion message and hints.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo "================================="

+ 2 - 2
lgsm/functions/install_config.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates default server configs.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Checks if server cfg dir exists, creates it if it doesn't

+ 2 - 2
lgsm/functions/install_dst_token.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Configures Don't Starve Together cluster with given token.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo ""

+ 2 - 2
lgsm/functions/install_factorio_save.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates the initial save file for Factorio
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 
 echo ""
 echo "Creating initial Factorio savefile"

+ 2 - 2
lgsm/functions/install_gslt.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Configures GSLT.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo ""

+ 2 - 2
lgsm/functions/install_header.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Prints installation header.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 clear

+ 2 - 2
lgsm/functions/install_logs.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates log directories.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if [ "${checklogs}" != "1" ]; then

+ 2 - 2
lgsm/functions/install_mta_resources.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_print_information_nl "${gamename} will not function without resources!"

+ 2 - 2
lgsm/functions/install_retry.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Asks for installation retry after failure.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 if fn_prompt_yn "Retry install?" Y; then

+ 2 - 2
lgsm/functions/install_server_dir.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Creates the server directory.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo ""

+ 2 - 2
lgsm/functions/install_server_files.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Installs server files.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_install_server_files(){

+ 2 - 2
lgsm/functions/install_squad_license.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Configures the Squad server's license.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo ""

+ 2 - 2
lgsm/functions/install_steamcmd.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Downloads SteamCMD on install.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 
 echo ""
 echo "Installing SteamCMD"

+ 2 - 2
lgsm/functions/install_ts3db.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Installs the database server MariaDB for TeamSpeak 3.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_install_ts3db_mariadb(){

+ 2 - 2
lgsm/functions/install_ut2k4_key.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Activates ut2k4 server with given key.
 
-commandname="INSTALL"
-commandaction="Install"
+local commandname="INSTALL"
+local commandaction="Install"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 echo ""

+ 2 - 2
lgsm/functions/logs.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Acts as a log rotator, removing old logs.
 
-commandname="LOGS"
-commandaction="Log-Manager"
+local commandname="LOGS"
+local commandaction="Log-Manager"
 
 # Check if logfile variable and file exist, create logfile if it doesn't exist
 if [ -n "${consolelog}" ]; then

+ 2 - 2
lgsm/functions/mods_core.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Core functions for mods list/install/update/remove
 
-commandname="MODS"
-commandaction="addons/mods"
+local commandname="MODS"
+local commandaction="addons/mods"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Files and Directories

+ 2 - 2
lgsm/functions/mods_list.sh

@@ -8,8 +8,8 @@
 # Usage: Then add this array to the mods_global_array.
 # Usage: If needed, you can scrape the download URL first.
 
-commandname="MODS"
-commandaction="List Mods"
+local commandname="MODS"
+local commandaction="List Mods"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Get a proper URL for mods that don't provide a good one (optional)

+ 2 - 2
lgsm/functions/update_factorio.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of Factorio servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_update_factorio_dl(){

+ 2 - 2
lgsm/functions/update_minecraft.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of Minecraft servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_update_dl(){

+ 2 - 2
lgsm/functions/update_mta.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of Multi Theft Auto servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_update_mta_dl(){

+ 2 - 2
lgsm/functions/update_mumble.sh

@@ -5,8 +5,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of mumble servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_update_mumble_dl(){

+ 2 - 2
lgsm/functions/update_steamcmd.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating using SteamCMD.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 check.sh

+ 2 - 2
lgsm/functions/update_ts3.sh

@@ -4,8 +4,8 @@
 # Website: https://linuxgsm.com
 # Description: Handles updating of teamspeak 3 servers.
 
-commandname="UPDATE"
-commandaction="Update"
+local commandname="UPDATE"
+local commandaction="Update"
 function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_update_ts3_dl(){