Skip to content

Commit

Permalink
Got rid of double returns
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed May 26, 2017
1 parent f277f8b commit 0bfbdbc
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 37 deletions.
5 changes: 1 addition & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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)
3 changes: 0 additions & 3 deletions lgsm/functions/alert_email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ fn_details_email(){
echo -e "${alertbody}" >> "${emaillog}"
}


fn_details_os(){
#
# Distro Details
Expand Down Expand Up @@ -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
}



fn_details_gameserver(){
#
# Quake Live Server Details
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/command_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ fn_backup_init(){
fi
}


# Check if server is started and wether to stop it
fn_backup_stop_server(){
check_status.sh
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/command_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ fn_details_statusbottom(){
echo -e ""
}


# Engine Specific details

fn_details_ark(){
Expand Down
2 changes: 0 additions & 2 deletions lgsm/functions/command_dev_detect_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ while read lib; do
unknownlib=1
echo "${lib}" >> "${tmpdir}/.depdetect_unknown"
fi

done < "${tmpdir}/.depdetect_readelf_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_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq"
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/command_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ check.sh
logs.sh
info_config.sh


fn_monitor_check_lockfile
fn_monitor_check_update
fn_monitor_msg_checking
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/command_postdetails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ if ! grep -q "^steamuser[= ]\"anonymous\"" "${tmpfile}" ; then
sed -i -e 's/steamuser[= ]"[^"]*/steamuser "--stripped--/' "${tmpfile}"
fi


if [ "${posttarget}" == "http://pastebin.com" ] ; then
fn_print_dots "Posting details to pastbin.com for ${postexpire}"
sleep 1
Expand Down
2 changes: 0 additions & 2 deletions lgsm/functions/command_ts3_server_pass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ local commandname="TS3-CHANGE-PASS"
local commandaction="ServerAdmin Password Change"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"


fn_serveradmin_password_prompt(){
fn_print_header
echo "Press \"CTRL+b d\" to exit console."
Expand All @@ -23,7 +22,6 @@ fn_serveradmin_password_prompt(){
read -p "Enter new password : " newpassword
}


fn_serveradmin_password_set(){
fn_print_info_nl "Starting server with new password..."
fn_script_log_info "Starting server with new password"
Expand Down
2 changes: 0 additions & 2 deletions lgsm/functions/core_dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ fn_fetch_file(){
fi
}


# GitHub file download functions
# Used to simplify downloading specific files from GitHub

Expand Down Expand Up @@ -236,7 +235,6 @@ fn_update_function(){
fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}


# 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)
for curlpath in "${curl_paths_array}"
Expand Down
7 changes: 0 additions & 7 deletions lgsm/functions/core_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


# Commands

command_console.sh(){
Expand Down Expand Up @@ -226,7 +225,6 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


# Compress

compress_unreal2_maps.sh(){
Expand Down Expand Up @@ -273,7 +271,6 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


# Fix

fix.sh(){
Expand Down Expand Up @@ -368,7 +365,6 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


# Alert

alert.sh(){
Expand All @@ -393,15 +389,13 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


# Monitor

monitor_gsquery.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}


# Update

command_update_functions.sh(){
Expand Down Expand Up @@ -454,7 +448,6 @@ functionfile="${FUNCNAME}"
fn_fetch_function
}


#
## Installer functions
#
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/core_getopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ fi
#Backup
currentopt+=( "${cmd_backup[@]}" )


# Exclude games without a console
if [ "${gamename}" != "TeamSpeak 3" ]; then
currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" )
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ fn_fix_msg_end(){
fi
}


# Fixes that are run on start
if [ "${function_selfname}" != "command_install.sh" ]; then
if [ -n "${appid}" ]; then
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/gsquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def sanity_checks(self):
if not self.option.port:
self.fatal_error('No port supplied.', 4)


if __name__ == '__main__':
parser = optparse.OptionParser(
usage='usage: python %prog [options]',
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/info_distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ minutes=$(( uptime/60%60 ))
hours=$(( uptime/60/60%24 ))
days=$(( uptime/60/60/24 ))


### Performance information

## Average server load
Expand Down
2 changes: 0 additions & 2 deletions lgsm/functions/mods_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ extractdir="${modstmpdir}/extract"
modsinstalledlist="installed-mods.txt"
modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}"



## Installation

# Download management
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_factorio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ fn_update_factorio_compare(){
fi
}


fn_update_factorio_arch
if [ "${installer}" == "1" ]; then
fn_update_factorio_availablebuild
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_minecraft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ fn_update_compare(){
fi
}


if [ "${installer}" == "1" ]; then
fn_update_availablebuild
fn_update_dl
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_mta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ fn_update_mta_compare(){
fi
}


if [ "${installer}" == "1" ]; then
fn_mta_get_availablebuild
fn_update_mta_dl
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_mumble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ fn_update_mumble_compare(){
fi
}


fn_update_mumble_arch
if [ "${installer}" == "1" ]; then
fn_update_mumble_availablebuild
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_steamcmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ fn_update_steamcmd_check(){
fi
}


if [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
# Goldsource servers bypass checks as fn_update_steamcmd_check does not work for appid 90 servers.
# forceupdate bypasses checks
Expand Down
1 change: 0 additions & 1 deletion lgsm/functions/update_ts3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ fn_update_ts3_compare(){
fi
}


fn_update_ts3_arch
if [ "${installer}" == "1" ]; then
fn_update_ts3_availablebuild
Expand Down
1 change: 0 additions & 1 deletion linuxgsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ configdir="${lgsmdir}/config-lgsm"
configdirserver="${configdir}/${servername}"
configdirdefault="${lgsmdir}/config-default"


## GitHub Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
Expand Down

0 comments on commit 0bfbdbc

Please sign in to comment.