Răsfoiți Sursa

functions_selfname is now just selfname

Also commented out any selfname that causes issues.
Daniel Gibbs 10 ani în urmă
părinte
comite
b32bb17ae4

+ 1 - 1
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"
 # fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "executecmd" "run" "force" "10cd7353aa9d758a075c600a6dd193fd"
 
 
 local modulename="Download"
 local modulename="Download"
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 
 fn_dl_md5(){
 fn_dl_md5(){
 	# Runs MD5 Check if available
 	# Runs MD5 Check if available

+ 1 - 1
lgsm/functions/core_getopt.sh

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 # Website: https://gameservermanagers.com
 # Description: getopt arguments.
 # Description: getopt arguments.
 
 
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 
 fn_getopt_generic(){
 fn_getopt_generic(){
 case "${getopt}" in
 case "${getopt}" in

+ 4 - 3
lgsm/functions/fix.sh

@@ -6,7 +6,8 @@
 # Runs functions that will fix an issue.
 # Runs functions that will fix an issue.
 
 
 local modulename="Fix"
 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
 # Messages that are displayed for some fixes
 fn_fix_msg_start(){
 fn_fix_msg_start(){
@@ -30,7 +31,7 @@ fn_fix_msg_end(){
 
 
 
 
 # Fixes that are run on start
 # Fixes that are run on start
-if [ "${function_selfname}" != "command_install.sh" ]; then
+if [ "${selfname}" != "command_install.sh" ]; then
 	if [ -n "${appid}" ]; then
 	if [ -n "${appid}" ]; then
 		fix_steamcmd.sh
 		fix_steamcmd.sh
 	fi
 	fi
@@ -51,7 +52,7 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
 fi
 fi
 
 
 # Fixes that are run on install only.
 # 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
 	if [ "${gamename}" == "Killing Floor" ]; then
 		echo ""
 		echo ""
 		echo "Applying ${gamename} Server Fixes"
 		echo "Applying ${gamename} Server Fixes"

+ 1 - 1
lgsm/functions/fix_arma3.sh

@@ -5,7 +5,7 @@
 # Description: Resolves an issue with ARMA3.
 # Description: Resolves an issue with ARMA3.
 
 
 local modulename="Fix"
 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.
 # Fixes: 20150 Segmentation fault (core dumped) error.
 if [ ! -d "${HOME}/.local/share/Arma 3" ]||[ ! -d "${HOME}/.local/share/Arma 3 - Other Profiles" ]; then
 if [ ! -d "${HOME}/.local/share/Arma 3" ]||[ ! -d "${HOME}/.local/share/Arma 3 - Other Profiles" ]; then

+ 1 - 1
lgsm/functions/fix_dst.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues with Dont Starve together.
 # Description: Resolves various issues with Dont Starve together.
 
 
 local modulename="Fix"
 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)
 # 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.
 # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.

+ 1 - 1
lgsm/functions/fix_glibc.sh

@@ -5,7 +5,7 @@
 # Description: Downloads required glibc files and applys teh glibc fix if required
 # Description: Downloads required glibc files and applys teh glibc fix if required
 
 
 local modulename="Fix"
 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" )
 local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "Just Cause 2" )
 for libstdc_server in "${libstdc_servers_array[@]}"
 for libstdc_server in "${libstdc_servers_array[@]}"

+ 3 - 2
lgsm/functions/fix_ins.sh

@@ -5,7 +5,8 @@
 # Description: Resolves various issues with Insurgency.
 # Description: Resolves various issues with Insurgency.
 
 
 local modulename="Fix"
 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.
 # 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.
 # 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}\""
 	defaultmap="\"${defaultmap}\""
 else
 else
 	defaultmap="\\\"${defaultmap}\\\""
 	defaultmap="\\\"${defaultmap}\\\""

+ 1 - 1
lgsm/functions/fix_kf.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues with Killing Floor.
 # Description: Resolves various issues with Killing Floor.
 
 
 local modulename="Fix"
 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 "Applying WebAdmin ROOst.css fix."
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"

+ 1 - 1
lgsm/functions/fix_ro.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues with Red Orchestra.
 # Description: Resolves various issues with Red Orchestra.
 
 
 local modulename="Fix"
 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 "Applying WebAdmin ROOst.css fix."
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"

+ 1 - 1
lgsm/functions/fix_steamcmd.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues related to steamCMD.
 # Description: Resolves various issues related to steamCMD.
 
 
 local modulename="Fix"
 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.
 # 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
 if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then

+ 1 - 1
lgsm/functions/fix_ut2k4.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues with Unreal Tournament 2004.
 # Description: Resolves various issues with Unreal Tournament 2004.
 
 
 local modulename="Fix"
 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 "applying WebAdmin ut2003.css fix."
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"

+ 1 - 1
lgsm/functions/fix_ut99.sh

@@ -5,7 +5,7 @@
 # Description: Resolves various issues with Unreal Tournament 99.
 # Description: Resolves various issues with Unreal Tournament 99.
 
 
 local modulename="Fix"
 local modulename="Fix"
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 
 echo "${servercfgfullpath}"
 echo "${servercfgfullpath}"
 echo "enabling UdpServerUplink."
 echo "enabling UdpServerUplink."

+ 1 - 1
lgsm/functions/info_config.sh

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 # Website: https://gameservermanagers.com
 # Description: Gets specific details from config files.
 # 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
 ## Examples of filtering to get info from config files
 # sed 's/foo//g' - remove foo
 # sed 's/foo//g' - remove foo

+ 1 - 1
lgsm/functions/info_distro.sh

@@ -5,7 +5,7 @@
 # Description: Variables providing useful info on the Operating System such as disk and performace info.
 # 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.
 # 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
 ### Distro infomation
 
 

+ 1 - 1
lgsm/functions/info_glibc.sh

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 # Website: https://gameservermanagers.com
 # Description: stores details on servers Glibc requirements.
 # 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
 if [ "${gamename}" == "Blade Symphony" ]; then
 	glibcrequired="2.15"
 	glibcrequired="2.15"

+ 1 - 1
lgsm/functions/info_parms.sh

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 # Website: https://gameservermanagers.com
 # Description: Gets specific details from server parameters.
 # 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
 ## Examples of filtering to get info from config files
 # sed 's/foo//g' - remove foo
 # sed 's/foo//g' - remove foo

+ 1 - 1
lgsm/functions/install_complete.sh

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 # Website: https://gameservermanagers.com
 
 
 local modulename="Install"
 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
 if [ "${gamename}" == "Don't Starve Together" ]; then
   echo ""
   echo ""

+ 1 - 1
lgsm/functions/update_ts3.sh

@@ -5,7 +5,7 @@
 # Description:Handles updating of teamspeak 3 servers.
 # Description:Handles updating of teamspeak 3 servers.
 
 
 local modulename="Update"
 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_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"
 	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"