Browse Source

Got rid of double returns

Daniel Gibbs 9 years ago
parent
commit
0bfbdbc01f

+ 1 - 4
CONTRIBUTING.md

@@ -36,7 +36,4 @@ This will help us in understanding your code and determining where problems may
 Start reading our code and you'll get the hang of it. Explore how functions are organized and you'll see how we strive for readable code.
 Start reading our code and you'll get the hang of it. Explore how functions are organized and you'll see how we strive for readable code.
 
 
 Please give the following document a read and adjust your code according to its specifications.
 Please give the following document a read and adjust your code according to its specifications.
-[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-&-Conventions)
-
-
-
+[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-&-Conventions)

+ 0 - 3
lgsm/functions/alert_email.sh

@@ -16,7 +16,6 @@ fn_details_email(){
 	echo -e "${alertbody}" >> "${emaillog}"
 	echo -e "${alertbody}" >> "${emaillog}"
 }
 }
 
 
-
 fn_details_os(){
 fn_details_os(){
 	#
 	#
 	# Distro Details
 	# Distro Details
@@ -90,8 +89,6 @@ fn_details_disk(){
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
 }
 }
 
 
-
-
 fn_details_gameserver(){
 fn_details_gameserver(){
 	#
 	#
 	# Quake Live Server Details
 	# Quake Live Server Details

+ 0 - 1
lgsm/functions/command_backup.sh

@@ -63,7 +63,6 @@ fn_backup_init(){
 	fi
 	fi
 }
 }
 
 
-
 # Check if server is started and wether to stop it
 # Check if server is started and wether to stop it
 fn_backup_stop_server(){
 fn_backup_stop_server(){
 	check_status.sh
 	check_status.sh

+ 0 - 1
lgsm/functions/command_details.sh

@@ -380,7 +380,6 @@ fn_details_statusbottom(){
 	echo -e ""
 	echo -e ""
 }
 }
 
 
-
 # Engine Specific details
 # Engine Specific details
 
 
 fn_details_ark(){
 fn_details_ark(){

+ 0 - 2
lgsm/functions/command_dev_detect_deps.sh

@@ -73,10 +73,8 @@ while read lib; do
 		unknownlib=1
 		unknownlib=1
 		echo "${lib}" >> "${tmpdir}/.depdetect_unknown"
 		echo "${lib}" >> "${tmpdir}/.depdetect_unknown"
 	fi
 	fi
-
 done < "${tmpdir}/.depdetect_readelf_uniq"
 done < "${tmpdir}/.depdetect_readelf_uniq"
 
 
-
 sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq"
 sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq"
 sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq"
 sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq"
 sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq"
 sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq"

+ 0 - 1
lgsm/functions/command_monitor.sh

@@ -105,7 +105,6 @@ check.sh
 logs.sh
 logs.sh
 info_config.sh
 info_config.sh
 
 
-
 fn_monitor_check_lockfile
 fn_monitor_check_lockfile
 fn_monitor_check_update
 fn_monitor_check_update
 fn_monitor_msg_checking
 fn_monitor_msg_checking

+ 0 - 1
lgsm/functions/command_postdetails.sh

@@ -107,7 +107,6 @@ if ! grep -q "^steamuser[= ]\"anonymous\"" "${tmpfile}" ; then
 	sed -i -e 's/steamuser[= ]"[^"]*/steamuser "--stripped--/' "${tmpfile}"
 	sed -i -e 's/steamuser[= ]"[^"]*/steamuser "--stripped--/' "${tmpfile}"
 fi
 fi
 
 
-
 if [ "${posttarget}" == "http://pastebin.com" ] ; then
 if [ "${posttarget}" == "http://pastebin.com" ] ; then
 	fn_print_dots "Posting details to pastbin.com for ${postexpire}"
 	fn_print_dots "Posting details to pastbin.com for ${postexpire}"
 	sleep 1
 	sleep 1

+ 0 - 2
lgsm/functions/command_ts3_server_pass.sh

@@ -9,7 +9,6 @@ local commandname="TS3-CHANGE-PASS"
 local commandaction="ServerAdmin Password Change"
 local commandaction="ServerAdmin Password Change"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 
-
 fn_serveradmin_password_prompt(){
 fn_serveradmin_password_prompt(){
 	fn_print_header
 	fn_print_header
 	echo "Press \"CTRL+b d\" to exit console."
 	echo "Press \"CTRL+b d\" to exit console."
@@ -23,7 +22,6 @@ fn_serveradmin_password_prompt(){
 	read -p "Enter new password : " newpassword
 	read -p "Enter new password : " newpassword
 }
 }
 
 
-
 fn_serveradmin_password_set(){
 fn_serveradmin_password_set(){
 	fn_print_info_nl "Starting server with new password..."
 	fn_print_info_nl "Starting server with new password..."
 	fn_script_log_info "Starting server with new password"
 	fn_script_log_info "Starting server with new password"

+ 0 - 2
lgsm/functions/core_dl.sh

@@ -154,7 +154,6 @@ fn_fetch_file(){
 	fi
 	fi
 }
 }
 
 
-
 # GitHub file download functions
 # GitHub file download functions
 # Used to simplify downloading specific files from GitHub
 # Used to simplify downloading specific files from GitHub
 
 
@@ -236,7 +235,6 @@ fn_update_function(){
 	fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
 	fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
 }
 }
 
 
-
 # Defines curl path
 # Defines curl path
 curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)
 curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)
 for curlpath in "${curl_paths_array}"
 for curlpath in "${curl_paths_array}"

+ 0 - 7
lgsm/functions/core_functions.sh

@@ -49,7 +49,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Commands
 # Commands
 
 
 command_console.sh(){
 command_console.sh(){
@@ -226,7 +225,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Compress
 # Compress
 
 
 compress_unreal2_maps.sh(){
 compress_unreal2_maps.sh(){
@@ -273,7 +271,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Fix
 # Fix
 
 
 fix.sh(){
 fix.sh(){
@@ -368,7 +365,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Alert
 # Alert
 
 
 alert.sh(){
 alert.sh(){
@@ -393,7 +389,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Monitor
 # Monitor
 
 
 monitor_gsquery.sh(){
 monitor_gsquery.sh(){
@@ -401,7 +396,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 # Update
 # Update
 
 
 command_update_functions.sh(){
 command_update_functions.sh(){
@@ -454,7 +448,6 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 fn_fetch_function
 }
 }
 
 
-
 #
 #
 ## Installer functions
 ## Installer functions
 #
 #

+ 0 - 1
lgsm/functions/core_getopt.sh

@@ -71,7 +71,6 @@ fi
 #Backup
 #Backup
 currentopt+=( "${cmd_backup[@]}" )
 currentopt+=( "${cmd_backup[@]}" )
 
 
-
 # Exclude games without a console
 # Exclude games without a console
 if [ "${gamename}" != "TeamSpeak 3" ]; then
 if [ "${gamename}" != "TeamSpeak 3" ]; then
 	currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" )
 	currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" )

+ 0 - 1
lgsm/functions/fix.sh

@@ -36,7 +36,6 @@ fn_fix_msg_end(){
 	fi
 	fi
 }
 }
 
 
-
 # Fixes that are run on start
 # Fixes that are run on start
 if [ "${function_selfname}" != "command_install.sh" ]; then
 if [ "${function_selfname}" != "command_install.sh" ]; then
 	if [ -n "${appid}" ]; then
 	if [ -n "${appid}" ]; then

+ 0 - 1
lgsm/functions/gsquery.py

@@ -76,7 +76,6 @@ class PythonGSQ:
         if not self.option.port:
         if not self.option.port:
             self.fatal_error('No port supplied.', 4)
             self.fatal_error('No port supplied.', 4)
 
 
-
 if __name__ == '__main__':
 if __name__ == '__main__':
     parser = optparse.OptionParser(
     parser = optparse.OptionParser(
         usage='usage: python %prog [options]',
         usage='usage: python %prog [options]',

+ 0 - 1
lgsm/functions/info_distro.sh

@@ -54,7 +54,6 @@ minutes=$(( uptime/60%60 ))
 hours=$(( uptime/60/60%24 ))
 hours=$(( uptime/60/60%24 ))
 days=$(( uptime/60/60/24 ))
 days=$(( uptime/60/60/24 ))
 
 
-
 ### Performance information
 ### Performance information
 
 
 ## Average server load
 ## Average server load

+ 0 - 2
lgsm/functions/mods_core.sh

@@ -16,8 +16,6 @@ extractdir="${modstmpdir}/extract"
 modsinstalledlist="installed-mods.txt"
 modsinstalledlist="installed-mods.txt"
 modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}"
 modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}"
 
 
-
-
 ## Installation
 ## Installation
 
 
 # Download management
 # Download management

+ 0 - 1
lgsm/functions/update_factorio.sh

@@ -151,7 +151,6 @@ fn_update_factorio_compare(){
 	fi
 	fi
 }
 }
 
 
-
 fn_update_factorio_arch
 fn_update_factorio_arch
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
 	fn_update_factorio_availablebuild
 	fn_update_factorio_availablebuild

+ 0 - 1
lgsm/functions/update_minecraft.sh

@@ -144,7 +144,6 @@ fn_update_compare(){
 	fi
 	fi
 }
 }
 
 
-
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
 	fn_update_availablebuild
 	fn_update_availablebuild
 	fn_update_dl
 	fn_update_dl

+ 0 - 1
lgsm/functions/update_mta.sh

@@ -139,7 +139,6 @@ fn_update_mta_compare(){
 	fi
 	fi
 }
 }
 
 
-
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
 	fn_mta_get_availablebuild
 	fn_mta_get_availablebuild
 	fn_update_mta_dl
 	fn_update_mta_dl

+ 0 - 1
lgsm/functions/update_mumble.sh

@@ -151,7 +151,6 @@ fn_update_mumble_compare(){
 	fi
 	fi
 }
 }
 
 
-
 fn_update_mumble_arch
 fn_update_mumble_arch
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
 	fn_update_mumble_availablebuild
 	fn_update_mumble_availablebuild

+ 0 - 1
lgsm/functions/update_steamcmd.sh

@@ -229,7 +229,6 @@ fn_update_steamcmd_check(){
 	fi
 	fi
 }
 }
 
 
-
 if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 	# Goldsource servers bypass checks as fn_update_steamcmd_check does not work for appid 90 servers.
 	# Goldsource servers bypass checks as fn_update_steamcmd_check does not work for appid 90 servers.
 	# forceupdate bypasses checks
 	# forceupdate bypasses checks

+ 0 - 1
lgsm/functions/update_ts3.sh

@@ -178,7 +178,6 @@ fn_update_ts3_compare(){
 	fi
 	fi
 }
 }
 
 
-
 fn_update_ts3_arch
 fn_update_ts3_arch
 if [ "${installer}" == "1" ]; then
 if [ "${installer}" == "1" ]; then
 	fn_update_ts3_availablebuild
 	fn_update_ts3_availablebuild

+ 0 - 1
linuxgsm.sh

@@ -34,7 +34,6 @@ configdir="${lgsmdir}/config-lgsm"
 configdirserver="${configdir}/${servername}"
 configdirserver="${configdir}/${servername}"
 configdirdefault="${lgsmdir}/config-default"
 configdirdefault="${lgsmdir}/config-default"
 
 
-
 ## GitHub Branch Select
 ## GitHub Branch Select
 # Allows for the use of different function files
 # Allows for the use of different function files
 # from a different repo and/or branch.
 # from a different repo and/or branch.