diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index d505cc1a4..71321fad2 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -17,7 +17,7 @@ # fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "executecmd" "run" "force" "10cd7353aa9d758a075c600a6dd193fd" local modulename="Download" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_dl_md5(){ # Runs MD5 Check if available diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 15686b35c..6cbb77b8e 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -4,7 +4,7 @@ # Website: https://gameservermanagers.com # Description: getopt arguments. -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_getopt_generic(){ case "${getopt}" in diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index d1d436432..c70087065 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -6,7 +6,8 @@ # Runs functions that will fix an issue. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +# Cannot have selfname as breaks if statements. +#local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Messages that are displayed for some fixes fn_fix_msg_start(){ @@ -30,7 +31,7 @@ fn_fix_msg_end(){ # Fixes that are run on start -if [ "${function_selfname}" != "command_install.sh" ]; then +if [ "${selfname}" != "command_install.sh" ]; then if [ -n "${appid}" ]; then fix_steamcmd.sh fi @@ -51,7 +52,7 @@ if [ "${function_selfname}" != "command_install.sh" ]; then fi # Fixes that are run on install only. -if [ "${function_selfname}" == "command_install.sh" ]; then +if [ "${selfname}" == "command_install.sh" ]; then if [ "${gamename}" == "Killing Floor" ]; then echo "" echo "Applying ${gamename} Server Fixes" diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index f788b85b9..5c66d2fd0 100644 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -5,7 +5,7 @@ # Description: Resolves an issue with ARMA3. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Fixes: 20150 Segmentation fault (core dumped) error. if [ ! -d "${HOME}/.local/share/Arma 3" ]||[ ! -d "${HOME}/.local/share/Arma 3 - Other Profiles" ]; then diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index 25fb8175b..31f77e416 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues with Dont Starve together. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local 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) # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index 82a689b8d..d1e0ab89f 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -5,7 +5,7 @@ # Description: Downloads required glibc files and applys teh glibc fix if required local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "Just Cause 2" ) for libstdc_server in "${libstdc_servers_array[@]}" diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index 7afc46eeb..5b6061fef 100644 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -5,7 +5,8 @@ # Description: Resolves various issues with Insurgency. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +# Cannot have selfname as breaks if statement. +#local selfname="$(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. @@ -13,7 +14,7 @@ export LD_LIBRARY_PATH=${filesdir}:${filesdir}/bin:${LD_LIBRARY_PATH} # Fixes: issue #529 - gamemode not passed to debug or start. -if [ "${function_selfname}" == "command_debug.sh" ]; then +if [ "${selfname}" == "command_debug.sh" ]; then defaultmap="\"${defaultmap}\"" else defaultmap="\\\"${defaultmap}\\\"" diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index 5d87e3f48..048fa839d 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues with Killing Floor. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "Applying WebAdmin ROOst.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index a8b062a22..8e3f6ccbd 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues with Red Orchestra. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "Applying WebAdmin ROOst.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index a95e888fc..00d871d10 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues related to steamCMD. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local 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. if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 1f6243989..3f82407ba 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues with Unreal Tournament 2004. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "applying WebAdmin ut2003.css fix." echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_ut99.sh b/lgsm/functions/fix_ut99.sh index 76213aaae..b956e6536 100644 --- a/lgsm/functions/fix_ut99.sh +++ b/lgsm/functions/fix_ut99.sh @@ -5,7 +5,7 @@ # Description: Resolves various issues with Unreal Tournament 99. local modulename="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" echo "${servercfgfullpath}" echo "enabling UdpServerUplink." diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index fd3cdbdc2..ffed74203 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -4,7 +4,7 @@ # Website: https://gameservermanagers.com # Description: Gets specific details from config files. -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" ## Examples of filtering to get info from config files # sed 's/foo//g' - remove foo diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index fdcd01b29..7e476e987 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -5,7 +5,7 @@ # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" ### Distro infomation diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 2a1adc058..8a02ec78e 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -4,7 +4,7 @@ # Website: https://gameservermanagers.com # Description: stores details on servers Glibc requirements. -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" if [ "${gamename}" == "Blade Symphony" ]; then glibcrequired="2.15" diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index efdab1c7e..a640ac938 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -4,7 +4,7 @@ # Website: https://gameservermanagers.com # Description: Gets specific details from server parameters. -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" ## Examples of filtering to get info from config files # sed 's/foo//g' - remove foo diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 962c12ff6..92c9e5082 100644 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -4,7 +4,7 @@ # Website: https://gameservermanagers.com local modulename="Install" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" if [ "${gamename}" == "Don't Starve Together" ]; then echo "" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 3fca4194f..752269217 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -5,7 +5,7 @@ # Description:Handles updating of teamspeak 3 servers. local modulename="Update" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_update_ts3_dl(){ fn_fetch_file "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" "${lgsmdir}/tmp" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2"