From 860126bf7d785f04ba41d864a8a41642fd8e68d2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 20:30:16 +0000 Subject: [PATCH 01/45] Initial renaming creating new branch to test renaming --- CounterStrikeGlobalOffensive/csgoserver | 5 +- functions/check.sh | 35 ++++++++++ functions/{fn_check_ip => check_ip.sh} | 0 functions/{fn_check_logs => check_logs.sh} | 0 functions/{fn_check_root => check_root.sh} | 2 +- .../{fn_check_steamcmd => check_steamcmd.sh} | 0 ...{fn_check_steamuser => check_steamuser.sh} | 0 ...{fn_check_systemdir => check_systemdir.sh} | 2 +- functions/{fn_check_tmux => check_tmux.sh} | 0 functions/{fn_backup => command_backup.sh} | 2 +- functions/{fn_console => command_console.sh} | 2 +- functions/{fn_debug => command_debug} | 2 +- functions/command_debug.sh | 68 +++++++++++++++++++ functions/{fn_details => command_details.sh} | 0 functions/{fn_install => command_install.sh} | 2 +- functions/{fn_monitor => command_monitor.sh} | 4 +- functions/{fn_start => command_start.sh} | 4 +- functions/{fn_stop => command_stop.sh} | 4 +- functions/command_update.sh | 0 .../{fn_validate => command_validate.sh} | 0 ...s_unreal2maps => compress_unreal2_maps.sh} | 2 +- ...ompress_ut99maps => compress_ut99_maps.sh} | 2 +- functions/{fn_functions => core_functions.sh} | 2 +- functions/{fn_getopt => core_getopt.sh} | 0 functions/{fn_messages => core_messages.sh} | 5 +- functions/{fn_debug_dev => dev_debug.sh} | 0 .../{fn_deps_detect => dev_detect_deps.sh} | 2 +- functions/{fn_email => email.sh} | 0 functions/{fn_email_test => email_test.sh} | 2 +- functions/{fn_arma3fix => fix_arma3.sh} | 0 functions/{fn_csgofix => fix_csgo.sh} | 0 .../{fn_install_glibcfix => fix_glibc.sh} | 0 functions/{fn_insfix => fix_ins.sh} | 0 .../{fn_details_config => info_config.sh} | 0 .../{fn_details_distro => info_distro.sh} | 0 functions/{fn_details_glibc => info_glibc.sh} | 0 .../{fn_check_ts3status => info_ts3status.sh} | 0 ...n_install_complete => install_complete.sh} | 0 .../{fn_install_config => install_config.sh} | 0 ...stall_ut2k4filesdl => install_dl_ut2k4.sh} | 0 ...install_ut99filesdl => install_dl_ut99.sh} | 0 .../{fn_install_kffix => install_fix_kf.sh} | 0 .../{fn_install_rofix => install_fix_ro.sh} | 0 ..._install_steamfix => install_fix_steam.sh} | 0 ..._install_ut2k4fix => install_fix_ut2k4.sh} | 0 ...fn_install_ut99fix => install_fix_ut99.sh} | 0 .../{fn_install_gslt => install_gslt.sh} | 0 ...{fn_install_gsquery => install_gsquery.sh} | 0 .../{fn_install_header => install_header.sh} | 0 .../{fn_install_logs => install_logs.sh} | 0 .../{fn_install_retry => install_retry.sh} | 0 ...install_serverdir => install_serverdir.sh} | 0 ...all_serverfiles => install_serverfiles.sh} | 0 ...n_install_steamcmd => install_steamcmd.sh} | 0 functions/{fn_install_ts3 => install_ts3} | 0 .../{fn_install_ut2k4 => install_ut2k4.sh} | 0 ..._install_ut2k4key => install_ut2k4_key.sh} | 0 .../{fn_install_ut99 => install_ut99.sh} | 0 functions/{fn_logs => logs.sh} | 0 .../{fn_monitor_query => monitor_gsquery.sh} | 0 .../{fn_update_check => update_check.sh} | 0 functions/{fn_update_dl => update_dl.sh} | 4 +- ...n_update_functions => update_functions.sh} | 0 63 files changed, 127 insertions(+), 24 deletions(-) create mode 100644 functions/check.sh rename functions/{fn_check_ip => check_ip.sh} (100%) rename functions/{fn_check_logs => check_logs.sh} (100%) rename functions/{fn_check_root => check_root.sh} (86%) rename functions/{fn_check_steamcmd => check_steamcmd.sh} (100%) rename functions/{fn_check_steamuser => check_steamuser.sh} (100%) rename functions/{fn_check_systemdir => check_systemdir.sh} (86%) rename functions/{fn_check_tmux => check_tmux.sh} (100%) rename functions/{fn_backup => command_backup.sh} (99%) rename functions/{fn_console => command_console.sh} (98%) rename functions/{fn_debug => command_debug} (99%) create mode 100644 functions/command_debug.sh rename functions/{fn_details => command_details.sh} (100%) rename functions/{fn_install => command_install.sh} (97%) rename functions/{fn_monitor => command_monitor.sh} (99%) rename functions/{fn_start => command_start.sh} (99%) rename functions/{fn_stop => command_stop.sh} (99%) create mode 100644 functions/command_update.sh rename functions/{fn_validate => command_validate.sh} (100%) rename functions/{fn_compress_unreal2maps => compress_unreal2_maps.sh} (98%) rename functions/{fn_compress_ut99maps => compress_ut99_maps.sh} (98%) rename functions/{fn_functions => core_functions.sh} (99%) rename functions/{fn_getopt => core_getopt.sh} (100%) rename functions/{fn_messages => core_messages.sh} (99%) rename functions/{fn_debug_dev => dev_debug.sh} (100%) rename functions/{fn_deps_detect => dev_detect_deps.sh} (99%) rename functions/{fn_email => email.sh} (100%) rename functions/{fn_email_test => email_test.sh} (97%) rename functions/{fn_arma3fix => fix_arma3.sh} (100%) rename functions/{fn_csgofix => fix_csgo.sh} (100%) rename functions/{fn_install_glibcfix => fix_glibc.sh} (100%) rename functions/{fn_insfix => fix_ins.sh} (100%) rename functions/{fn_details_config => info_config.sh} (100%) rename functions/{fn_details_distro => info_distro.sh} (100%) rename functions/{fn_details_glibc => info_glibc.sh} (100%) rename functions/{fn_check_ts3status => info_ts3status.sh} (100%) rename functions/{fn_install_complete => install_complete.sh} (100%) rename functions/{fn_install_config => install_config.sh} (100%) rename functions/{fn_install_ut2k4filesdl => install_dl_ut2k4.sh} (100%) rename functions/{fn_install_ut99filesdl => install_dl_ut99.sh} (100%) rename functions/{fn_install_kffix => install_fix_kf.sh} (100%) rename functions/{fn_install_rofix => install_fix_ro.sh} (100%) rename functions/{fn_install_steamfix => install_fix_steam.sh} (100%) rename functions/{fn_install_ut2k4fix => install_fix_ut2k4.sh} (100%) rename functions/{fn_install_ut99fix => install_fix_ut99.sh} (100%) rename functions/{fn_install_gslt => install_gslt.sh} (100%) rename functions/{fn_install_gsquery => install_gsquery.sh} (100%) rename functions/{fn_install_header => install_header.sh} (100%) rename functions/{fn_install_logs => install_logs.sh} (100%) rename functions/{fn_install_retry => install_retry.sh} (100%) rename functions/{fn_install_serverdir => install_serverdir.sh} (100%) rename functions/{fn_install_serverfiles => install_serverfiles.sh} (100%) rename functions/{fn_install_steamcmd => install_steamcmd.sh} (100%) rename functions/{fn_install_ts3 => install_ts3} (100%) rename functions/{fn_install_ut2k4 => install_ut2k4.sh} (100%) rename functions/{fn_install_ut2k4key => install_ut2k4_key.sh} (100%) rename functions/{fn_install_ut99 => install_ut99.sh} (100%) rename functions/{fn_logs => logs.sh} (100%) rename functions/{fn_monitor_query => monitor_gsquery.sh} (100%) rename functions/{fn_update_check => update_check.sh} (100%) rename functions/{fn_update_dl => update_dl.sh} (99%) rename functions/{fn_update_functions => update_functions.sh} (100%) diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 1a06e28bf..1af1b727f 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -155,7 +155,4 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_functions - -getopt=$1 -fn_getopt +core_functions.sh \ No newline at end of file diff --git a/functions/check.sh b/functions/check.sh new file mode 100644 index 000000000..db143a978 --- /dev/null +++ b/functions/check.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LGSM fn_check function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="201215" + +# Description: Overall function for managing checks. +# Runs checks that will either halt on or fix an issue. + +fn_module_compare() { + local e + for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done + return 1 +} + + +check_root.sh + +if [ "${module}" != "install" ]; then + check_executable.sh +fi + +no_check_logs=( details install map-compressor) +fn_module_compare "${module}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + fn_check_logs +fi + + +fn_check_ip +fn_check_steamcmd +fn_check_steamuser +fn_check_tmux + +fn_check_ts3status # may need to move out of checks \ No newline at end of file diff --git a/functions/fn_check_ip b/functions/check_ip.sh similarity index 100% rename from functions/fn_check_ip rename to functions/check_ip.sh diff --git a/functions/fn_check_logs b/functions/check_logs.sh similarity index 100% rename from functions/fn_check_logs rename to functions/check_logs.sh diff --git a/functions/fn_check_root b/functions/check_root.sh similarity index 86% rename from functions/fn_check_root rename to functions/check_root.sh index 16f253e35..3275d2261 100644 --- a/functions/fn_check_root +++ b/functions/check_root.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_root function +# LGSM check_root.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/fn_check_steamcmd b/functions/check_steamcmd.sh similarity index 100% rename from functions/fn_check_steamcmd rename to functions/check_steamcmd.sh diff --git a/functions/fn_check_steamuser b/functions/check_steamuser.sh similarity index 100% rename from functions/fn_check_steamuser rename to functions/check_steamuser.sh diff --git a/functions/fn_check_systemdir b/functions/check_systemdir.sh similarity index 86% rename from functions/fn_check_systemdir rename to functions/check_systemdir.sh index fba1566f0..ffd92253a 100644 --- a/functions/fn_check_systemdir +++ b/functions/check_systemdir.sh @@ -4,7 +4,7 @@ # Website: http://gameservermanagers.com lgsm_version="061115" -if [ ! -e "${systemdir}" ]; then +if [ ! -f "${systemdir}" ]; then fn_printfailnl "Cannot access ${systemdir}: No such directory" exit 1 fi diff --git a/functions/fn_check_tmux b/functions/check_tmux.sh similarity index 100% rename from functions/fn_check_tmux rename to functions/check_tmux.sh diff --git a/functions/fn_backup b/functions/command_backup.sh similarity index 99% rename from functions/fn_backup rename to functions/command_backup.sh index 33b946d1a..8790767ac 100644 --- a/functions/fn_backup +++ b/functions/command_backup.sh @@ -7,7 +7,7 @@ lgsm_version="201215" # Description: Creates a .tar.gz file in the backup directory. local modulename="Backup" -fn_check_root +check_root.sh fn_check_systemdir backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')" echo "" diff --git a/functions/fn_console b/functions/command_console.sh similarity index 98% rename from functions/fn_console rename to functions/command_console.sh index 992c9bd1a..991499a2f 100644 --- a/functions/fn_console +++ b/functions/command_console.sh @@ -7,7 +7,7 @@ lgsm_version="061115" # Description: Gives access to the server tmux console. local modulename="Console" -fn_check_root +check_root.sh fn_check_systemdir echo "" echo "${gamename} Console" diff --git a/functions/fn_debug b/functions/command_debug similarity index 99% rename from functions/fn_debug rename to functions/command_debug index cb4067943..39399f52c 100644 --- a/functions/fn_debug +++ b/functions/command_debug @@ -7,7 +7,7 @@ lgsm_version="061115" # Description: Runs the server without tmux. Runs direct from the terminal. local modulename="Debug" -fn_check_root +check_root.sh fn_check_systemdir fn_check_ip fn_check_logs diff --git a/functions/command_debug.sh b/functions/command_debug.sh new file mode 100644 index 000000000..39399f52c --- /dev/null +++ b/functions/command_debug.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# LGSM fn_debug function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="061115" + +# Description: Runs the server without tmux. Runs direct from the terminal. + +local modulename="Debug" +check_root.sh +fn_check_systemdir +fn_check_ip +fn_check_logs +fn_details_distro +fn_parms +echo "" +echo "${gamename} Debug" +echo "============================" +echo "" +echo -e "Distro: ${os}" +echo -e "Arch: ${arch}" +echo -e "Kernel: ${kernel}" +echo -e "Hostname: $HOSTNAME" +echo "" +echo "Start parameters:" +if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then + echo "${executable} ${parms} -debug" +else + echo "${executable} ${parms}" +fi +echo "" +echo -e "Use for identifying server issues only!" +echo -e "Press CTRL+c to drop out of debug mode." +fn_printwarningnl "If ${servicename} is already running it will be stopped." +echo "" +while true; do + read -e -i "y" -p "Continue? [Y/n]" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) echo Exiting; return;; + * ) echo "Please answer yes or no.";; +esac +done +fn_scriptlog "Starting debug" +fn_printinfonl "Stopping any running servers" +fn_scriptlog "Stopping any running servers" +sleep 1 +fn_stop +fn_printdots "Starting debug" +sleep 1 +fn_printok "Starting debug" +fn_scriptlog "Started debug" +sleep 1 +echo -en "\n" +cd "${executabledir}" +if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then + if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then + startfix=1 + fn_csgofix + elif [ "${gamename}" == "Insurgency" ]; then + fn_insfix + elif [ "${gamename}" == "ARMA 3" ]; then + fn_arma3fix + fi + ${executable} ${parms} -debug +else + ${executable} ${parms} +fi \ No newline at end of file diff --git a/functions/fn_details b/functions/command_details.sh similarity index 100% rename from functions/fn_details rename to functions/command_details.sh diff --git a/functions/fn_install b/functions/command_install.sh similarity index 97% rename from functions/fn_install rename to functions/command_install.sh index 0cc9129c4..5cba3b51b 100644 --- a/functions/fn_install +++ b/functions/command_install.sh @@ -4,7 +4,7 @@ # Website: http://gameservermanagers.com lgsm_version="201215" -fn_check_root +check_root.sh fn_install_header fn_install_serverdir diff --git a/functions/fn_monitor b/functions/command_monitor.sh similarity index 99% rename from functions/fn_monitor rename to functions/command_monitor.sh index 02380440e..6ea75a020 100644 --- a/functions/fn_monitor +++ b/functions/command_monitor.sh @@ -10,7 +10,7 @@ lgsm_version="061115" local modulename="Monitor" fn_monitor_teamspeak3(){ -fn_check_root +check_root.sh fn_check_systemdir fn_logs fn_printdots "${servername}" @@ -54,7 +54,7 @@ fn_restart } fn_monitor_tmux(){ -fn_check_root +check_root.sh fn_check_systemdir fn_check_ip fn_details_config diff --git a/functions/fn_start b/functions/command_start.sh similarity index 99% rename from functions/fn_start rename to functions/command_start.sh index 742c76b60..96193e286 100644 --- a/functions/fn_start +++ b/functions/command_start.sh @@ -9,7 +9,7 @@ lgsm_version="201215" local modulename="Starting" fn_start_teamspeak3(){ -fn_check_root +check_root.sh fn_check_systemdir fn_check_logs fn_check_ts3status @@ -73,7 +73,7 @@ echo -en "\n" } fn_start_tmux(){ -fn_check_root +check_root.sh fn_check_systemdir fn_check_ip fn_check_logs diff --git a/functions/fn_stop b/functions/command_stop.sh similarity index 99% rename from functions/fn_stop rename to functions/command_stop.sh index 35244f1fd..68b2d002e 100644 --- a/functions/fn_stop +++ b/functions/command_stop.sh @@ -29,7 +29,7 @@ sdtd_telnet(){ } fn_stop_teamspeak3(){ -fn_check_root +check_root.sh fn_check_systemdir fn_printdots "${servername}" fn_scriptlog "${servername}" @@ -50,7 +50,7 @@ echo -en "\n" } fn_stop_tmux(){ -fn_check_root +check_root.sh fn_check_systemdir fn_details_config fn_printdots "${servername}" diff --git a/functions/command_update.sh b/functions/command_update.sh new file mode 100644 index 000000000..e69de29bb diff --git a/functions/fn_validate b/functions/command_validate.sh similarity index 100% rename from functions/fn_validate rename to functions/command_validate.sh diff --git a/functions/fn_compress_unreal2maps b/functions/compress_unreal2_maps.sh similarity index 98% rename from functions/fn_compress_unreal2maps rename to functions/compress_unreal2_maps.sh index fec5d113f..aa9c5d0ad 100644 --- a/functions/fn_compress_unreal2maps +++ b/functions/compress_unreal2_maps.sh @@ -4,7 +4,7 @@ # Website: http://gameservermanagers.com lgsm_version="061115" -fn_check_root +check_root.sh clear echo "${gamename} Map Compressor" echo "============================" diff --git a/functions/fn_compress_ut99maps b/functions/compress_ut99_maps.sh similarity index 98% rename from functions/fn_compress_ut99maps rename to functions/compress_ut99_maps.sh index f9e0c9433..b5a1a04d0 100644 --- a/functions/fn_compress_ut99maps +++ b/functions/compress_ut99_maps.sh @@ -4,7 +4,7 @@ # Website: http://gameservermanagers.com lgsm_version="061115" -fn_check_root +check_root.sh clear echo "${gamename} Map Compressor" echo "============================" diff --git a/functions/fn_functions b/functions/core_functions.sh similarity index 99% rename from functions/fn_functions rename to functions/core_functions.sh index 39e3220d6..c684c97af 100644 --- a/functions/fn_functions +++ b/functions/core_functions.sh @@ -27,7 +27,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_root(){ +check_root.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/fn_getopt b/functions/core_getopt.sh similarity index 100% rename from functions/fn_getopt rename to functions/core_getopt.sh diff --git a/functions/fn_messages b/functions/core_messages.sh similarity index 99% rename from functions/fn_messages rename to functions/core_messages.sh index a8d55cb5b..c33e466d0 100644 --- a/functions/fn_messages +++ b/functions/core_messages.sh @@ -145,4 +145,7 @@ fn_printokeol(){ # FAIL for end of line fn_printfaileol(){ echo -e "\e[0;31mFAIL\e[0m\n" -} \ No newline at end of file +} + +getopt=$1 +core_getopt.sh \ No newline at end of file diff --git a/functions/fn_debug_dev b/functions/dev_debug.sh similarity index 100% rename from functions/fn_debug_dev rename to functions/dev_debug.sh diff --git a/functions/fn_deps_detect b/functions/dev_detect_deps.sh similarity index 99% rename from functions/fn_deps_detect rename to functions/dev_detect_deps.sh index 93e11094b..bd17b97b8 100644 --- a/functions/fn_deps_detect +++ b/functions/dev_detect_deps.sh @@ -7,7 +7,7 @@ lgsm_version="201215" # Description: Detects dependencies the server binary requires. local modulename="Backup" -fn_check_root +check_root.sh fn_check_systemdir cd "${executabledir}" if [ "${executable}" == "./hlds_run" ]; then diff --git a/functions/fn_email b/functions/email.sh similarity index 100% rename from functions/fn_email rename to functions/email.sh diff --git a/functions/fn_email_test b/functions/email_test.sh similarity index 97% rename from functions/fn_email_test rename to functions/email_test.sh index f46924d53..226c980f5 100644 --- a/functions/fn_email_test +++ b/functions/email_test.sh @@ -7,7 +7,7 @@ lgsm_version="061115" # Description: Sends a test email notification. local modulename="Email" -fn_check_root +check_root.sh fn_check_systemdir fn_details_config if [ "${emailnotification}" = "on" ]; then diff --git a/functions/fn_arma3fix b/functions/fix_arma3.sh similarity index 100% rename from functions/fn_arma3fix rename to functions/fix_arma3.sh diff --git a/functions/fn_csgofix b/functions/fix_csgo.sh similarity index 100% rename from functions/fn_csgofix rename to functions/fix_csgo.sh diff --git a/functions/fn_install_glibcfix b/functions/fix_glibc.sh similarity index 100% rename from functions/fn_install_glibcfix rename to functions/fix_glibc.sh diff --git a/functions/fn_insfix b/functions/fix_ins.sh similarity index 100% rename from functions/fn_insfix rename to functions/fix_ins.sh diff --git a/functions/fn_details_config b/functions/info_config.sh similarity index 100% rename from functions/fn_details_config rename to functions/info_config.sh diff --git a/functions/fn_details_distro b/functions/info_distro.sh similarity index 100% rename from functions/fn_details_distro rename to functions/info_distro.sh diff --git a/functions/fn_details_glibc b/functions/info_glibc.sh similarity index 100% rename from functions/fn_details_glibc rename to functions/info_glibc.sh diff --git a/functions/fn_check_ts3status b/functions/info_ts3status.sh similarity index 100% rename from functions/fn_check_ts3status rename to functions/info_ts3status.sh diff --git a/functions/fn_install_complete b/functions/install_complete.sh similarity index 100% rename from functions/fn_install_complete rename to functions/install_complete.sh diff --git a/functions/fn_install_config b/functions/install_config.sh similarity index 100% rename from functions/fn_install_config rename to functions/install_config.sh diff --git a/functions/fn_install_ut2k4filesdl b/functions/install_dl_ut2k4.sh similarity index 100% rename from functions/fn_install_ut2k4filesdl rename to functions/install_dl_ut2k4.sh diff --git a/functions/fn_install_ut99filesdl b/functions/install_dl_ut99.sh similarity index 100% rename from functions/fn_install_ut99filesdl rename to functions/install_dl_ut99.sh diff --git a/functions/fn_install_kffix b/functions/install_fix_kf.sh similarity index 100% rename from functions/fn_install_kffix rename to functions/install_fix_kf.sh diff --git a/functions/fn_install_rofix b/functions/install_fix_ro.sh similarity index 100% rename from functions/fn_install_rofix rename to functions/install_fix_ro.sh diff --git a/functions/fn_install_steamfix b/functions/install_fix_steam.sh similarity index 100% rename from functions/fn_install_steamfix rename to functions/install_fix_steam.sh diff --git a/functions/fn_install_ut2k4fix b/functions/install_fix_ut2k4.sh similarity index 100% rename from functions/fn_install_ut2k4fix rename to functions/install_fix_ut2k4.sh diff --git a/functions/fn_install_ut99fix b/functions/install_fix_ut99.sh similarity index 100% rename from functions/fn_install_ut99fix rename to functions/install_fix_ut99.sh diff --git a/functions/fn_install_gslt b/functions/install_gslt.sh similarity index 100% rename from functions/fn_install_gslt rename to functions/install_gslt.sh diff --git a/functions/fn_install_gsquery b/functions/install_gsquery.sh similarity index 100% rename from functions/fn_install_gsquery rename to functions/install_gsquery.sh diff --git a/functions/fn_install_header b/functions/install_header.sh similarity index 100% rename from functions/fn_install_header rename to functions/install_header.sh diff --git a/functions/fn_install_logs b/functions/install_logs.sh similarity index 100% rename from functions/fn_install_logs rename to functions/install_logs.sh diff --git a/functions/fn_install_retry b/functions/install_retry.sh similarity index 100% rename from functions/fn_install_retry rename to functions/install_retry.sh diff --git a/functions/fn_install_serverdir b/functions/install_serverdir.sh similarity index 100% rename from functions/fn_install_serverdir rename to functions/install_serverdir.sh diff --git a/functions/fn_install_serverfiles b/functions/install_serverfiles.sh similarity index 100% rename from functions/fn_install_serverfiles rename to functions/install_serverfiles.sh diff --git a/functions/fn_install_steamcmd b/functions/install_steamcmd.sh similarity index 100% rename from functions/fn_install_steamcmd rename to functions/install_steamcmd.sh diff --git a/functions/fn_install_ts3 b/functions/install_ts3 similarity index 100% rename from functions/fn_install_ts3 rename to functions/install_ts3 diff --git a/functions/fn_install_ut2k4 b/functions/install_ut2k4.sh similarity index 100% rename from functions/fn_install_ut2k4 rename to functions/install_ut2k4.sh diff --git a/functions/fn_install_ut2k4key b/functions/install_ut2k4_key.sh similarity index 100% rename from functions/fn_install_ut2k4key rename to functions/install_ut2k4_key.sh diff --git a/functions/fn_install_ut99 b/functions/install_ut99.sh similarity index 100% rename from functions/fn_install_ut99 rename to functions/install_ut99.sh diff --git a/functions/fn_logs b/functions/logs.sh similarity index 100% rename from functions/fn_logs rename to functions/logs.sh diff --git a/functions/fn_monitor_query b/functions/monitor_gsquery.sh similarity index 100% rename from functions/fn_monitor_query rename to functions/monitor_gsquery.sh diff --git a/functions/fn_update_check b/functions/update_check.sh similarity index 100% rename from functions/fn_update_check rename to functions/update_check.sh diff --git a/functions/fn_update_dl b/functions/update_dl.sh similarity index 99% rename from functions/fn_update_dl rename to functions/update_dl.sh index 835727cd0..52d72774a 100644 --- a/functions/fn_update_dl +++ b/functions/update_dl.sh @@ -9,7 +9,7 @@ lgsm_version="061115" local modulename="Update" fn_steamcmd_dl(){ -fn_check_root +check_root.sh fn_check_systemdir fn_details_config fn_printdots "Updating ${servername}" @@ -39,7 +39,7 @@ fi } fn_teamspeak3_dl(){ -fn_check_root +check_root.sh fn_check_systemdir fn_details_config fn_printdots "Updating ${servername}" diff --git a/functions/fn_update_functions b/functions/update_functions.sh similarity index 100% rename from functions/fn_update_functions rename to functions/update_functions.sh From 51414a9bc42a3168787e2573fdf892b80c13abac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 20:44:59 +0000 Subject: [PATCH 02/45] Changed core functions names --- functions/core_functions.sh | 6 +++--- functions/core_messages.sh | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index c684c97af..ce5ea996e 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -122,7 +122,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_getopt(){ +core_getopt.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -137,7 +137,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_messages(){ +core_messages.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -320,4 +320,4 @@ fn_runfunction } # Calls on-screen messages -fn_messages +core_messages.sh diff --git a/functions/core_messages.sh b/functions/core_messages.sh index c33e466d0..a8d55cb5b 100644 --- a/functions/core_messages.sh +++ b/functions/core_messages.sh @@ -145,7 +145,4 @@ fn_printokeol(){ # FAIL for end of line fn_printfaileol(){ echo -e "\e[0;31mFAIL\e[0m\n" -} - -getopt=$1 -core_getopt.sh \ No newline at end of file +} \ No newline at end of file From 0172de852e1577e9de13dab76a337eaaabb417dc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 21:02:35 +0000 Subject: [PATCH 03/45] changed more functions --- functions/check.sh | 12 ++++++++---- functions/command_debug | 5 ++--- functions/core_functions.sh | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index db143a978..5a5961633 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -17,17 +17,21 @@ fn_module_compare() { check_root.sh if [ "${module}" != "install" ]; then - check_executable.sh + check_systemdir.sh fi -no_check_logs=( details install map-compressor) -fn_module_compare "${module}" "${no_check_logs[@]}" +no_check_logs=( details install map-compressor ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" if [ $? != 0 ]; then fn_check_logs fi +check_ip=( debug ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_ip.sh +fi -fn_check_ip fn_check_steamcmd fn_check_steamuser fn_check_tmux diff --git a/functions/command_debug b/functions/command_debug index 39399f52c..59f685098 100644 --- a/functions/command_debug +++ b/functions/command_debug @@ -5,10 +5,9 @@ lgsm_version="061115" # Description: Runs the server without tmux. Runs direct from the terminal. - +local cmd="debug" local modulename="Debug" -check_root.sh -fn_check_systemdir +check.sh fn_check_ip fn_check_logs fn_details_distro diff --git a/functions/core_functions.sh b/functions/core_functions.sh index ce5ea996e..7e86c541e 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -17,12 +17,12 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_ip(){ +check_ip.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_logs(){ +check_logs.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -77,7 +77,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_debug(){ +command_debug.sh(){ functionfile="${FUNCNAME}" fn_runfunction } From f9369ed6f2014dbbd17e8e88bc8a2347de6a0359 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 21:05:32 +0000 Subject: [PATCH 04/45] changed debug --- functions/core_getopt.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index 8c6f93fb1..3e9f15c81 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -34,9 +34,9 @@ case "$getopt" in c|console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; ai|auto-install) @@ -91,7 +91,7 @@ case "$getopt" in b|backup) fn_backup;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; ai|auto-install) @@ -138,11 +138,11 @@ case "$getopt" in b|backup) fn_backup;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dd|depsdetect) fn_deps_detect;; *) @@ -194,9 +194,9 @@ case "$getopt" in c|console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; ai|auto-install) @@ -254,9 +254,9 @@ case "$getopt" in c|console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; mc|map-compressor) @@ -316,9 +316,9 @@ case "$getopt" in c|console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; ai|auto-install) @@ -377,9 +377,9 @@ case "$getopt" in c|console) fn_console;; d|debug) - fn_debug;; + command_debug.sh;; dev|dev-debug) - fn_debug_dev;; + command_debug.sh_dev;; i|install) fn_install;; mc|map-compressor) From 1233d2a9672b31509ecae4321f659d86335a0e4f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 21:08:31 +0000 Subject: [PATCH 05/45] systemdir --- functions/core_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 7e86c541e..bfa6cbb42 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -42,7 +42,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_systemdir(){ +check_systemdir.sh(){ functionfile="${FUNCNAME}" fn_runfunction } From 56adabe6df65411a0089a72c3f20865de83faafd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 24 Dec 2015 21:25:54 +0000 Subject: [PATCH 06/45] added more to check.sh --- functions/check.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index 5a5961633..140627aeb 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -16,11 +16,11 @@ fn_module_compare() { check_root.sh -if [ "${module}" != "install" ]; then +if [ "${cmd}" != "install" ]; then check_systemdir.sh fi -no_check_logs=( details install map-compressor ) +no_check_logs=( debug details install map-compressor ) fn_module_compare "${cmd}" "${no_check_logs[@]}" if [ $? != 0 ]; then fn_check_logs @@ -32,8 +32,17 @@ if [ $? != 0 ]; then check_ip.sh fi -fn_check_steamcmd -fn_check_steamuser -fn_check_tmux +check_ip=( debug ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_steamuser.sh + check_steamcmd.sh +fi + +check_ip=( start ) +fn_module_compare "${cmd}" "${no_check_logs[@]}" +if [ $? != 0 ]; then + check_tmux.sh +fi -fn_check_ts3status # may need to move out of checks \ No newline at end of file +#fn_check_ts3status # may need to move out of checks \ No newline at end of file From f005da0fe8f4db344826be19c52da4bb8f115099 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 09:37:42 +0000 Subject: [PATCH 07/45] Renamed all functions test required now --- functions/check.sh | 4 +- functions/check_ip.sh | 2 +- functions/check_logs.sh | 4 +- functions/check_steamcmd.sh | 2 +- functions/check_steamuser.sh | 2 +- functions/check_tmux.sh | 2 +- functions/command_backup.sh | 2 +- functions/command_console.sh | 6 +- functions/command_debug | 67 ------ functions/command_debug.sh | 16 +- functions/command_details.sh | 348 ++++++++++++++--------------- functions/command_install.sh | 44 ++-- functions/command_monitor.sh | 28 +-- functions/command_start.sh | 40 ++-- functions/command_stop.sh | 18 +- functions/command_validate.sh | 12 +- functions/compress_unreal2_maps.sh | 2 +- functions/compress_ut99_maps.sh | 2 +- functions/core_functions.sh | 114 +++++----- functions/core_getopt.sh | 148 ++++++------ functions/dev_debug.sh | 2 +- functions/email.sh | 6 +- functions/email_test.sh | 6 +- functions/fix_arma3.sh | 2 +- functions/fix_csgo.sh | 6 +- functions/fix_glibc.sh | 2 +- functions/fix_ins.sh | 2 +- functions/info_config.sh | 2 +- functions/info_distro.sh | 4 +- functions/info_glibc.sh | 2 +- functions/info_ts3status.sh | 2 +- functions/install_complete.sh | 2 +- functions/install_config.sh | 2 +- functions/install_dl_ut2k4.sh | 6 +- functions/install_dl_ut99.sh | 2 +- functions/install_fix_kf.sh | 10 +- functions/install_fix_ro.sh | 10 +- functions/install_fix_steam.sh | 2 +- functions/install_fix_ut2k4.sh | 10 +- functions/install_fix_ut99.sh | 2 +- functions/install_gslt.sh | 2 +- functions/install_gsquery.sh | 2 +- functions/install_header.sh | 2 +- functions/install_logs.sh | 2 +- functions/install_retry.sh | 2 +- functions/install_serverdir.sh | 2 +- functions/install_serverfiles.sh | 22 +- functions/install_ts3 | 4 +- functions/install_ut2k4.sh | 4 +- functions/install_ut2k4_key.sh | 2 +- functions/install_ut99.sh | 4 +- functions/logs.sh | 2 +- functions/monitor_gsquery.sh | 10 +- functions/update_check.sh | 58 ++--- functions/update_dl.sh | 8 +- functions/update_functions.sh | 2 +- tests/tests_jc2server.sh | 44 ++-- tests/tests_ts3server.sh | 32 +-- 58 files changed, 543 insertions(+), 606 deletions(-) delete mode 100644 functions/command_debug diff --git a/functions/check.sh b/functions/check.sh index 140627aeb..6cbe69b91 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -23,7 +23,7 @@ fi no_check_logs=( debug details install map-compressor ) fn_module_compare "${cmd}" "${no_check_logs[@]}" if [ $? != 0 ]; then - fn_check_logs + check_logs.sh fi check_ip=( debug ) @@ -45,4 +45,4 @@ if [ $? != 0 ]; then check_tmux.sh fi -#fn_check_ts3status # may need to move out of checks \ No newline at end of file +#check_ts3status.sh # may need to move out of checks \ No newline at end of file diff --git a/functions/check_ip.sh b/functions/check_ip.sh index 67c76fec8..e3e151d08 100644 --- a/functions/check_ip.sh +++ b/functions/check_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_ip function +# LGSM check_ip.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/check_logs.sh b/functions/check_logs.sh index 526a4036b..453e04f76 100644 --- a/functions/check_logs.sh +++ b/functions/check_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_logs function +# LGSM check_logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -13,5 +13,5 @@ if [ ! -d "${scriptlogdir}" ]; then fn_printinfo "Checking for log files: Creating log files" echo -en "\n" checklogs=1 - fn_install_logs + install_logs.sh fi diff --git a/functions/check_steamcmd.sh b/functions/check_steamcmd.sh index d29e218b1..c5926103e 100644 --- a/functions/check_steamcmd.sh +++ b/functions/check_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_steamcmd function +# LGSM check_steamcmd.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/check_steamuser.sh b/functions/check_steamuser.sh index 35e7c4f95..39f3b2cfd 100644 --- a/functions/check_steamuser.sh +++ b/functions/check_steamuser.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_steamuser function +# LGSM check_steamuser.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/check_tmux.sh b/functions/check_tmux.sh index 13aedad4f..b37fe7421 100644 --- a/functions/check_tmux.sh +++ b/functions/check_tmux.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_tmux function +# LGSM check_tmux.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/command_backup.sh b/functions/command_backup.sh index 8790767ac..e7bc601e9 100644 --- a/functions/command_backup.sh +++ b/functions/command_backup.sh @@ -34,7 +34,7 @@ if [ "${tmuxwc}" -eq 1 ]; then while true; do read -p "Stop ${servicename} while running the backup? [y/N]" yn case $yn in - [Yy]* ) fn_stop; break;; + [Yy]* ) command_stop.sh; break;; [Nn]* ) break;; * ) echo "Please answer yes or no.";; esac diff --git a/functions/command_console.sh b/functions/command_console.sh index 991499a2f..fb066e345 100644 --- a/functions/command_console.sh +++ b/functions/command_console.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_console function +# LGSM command_console.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -26,7 +26,7 @@ esac done fn_printdots "Starting" sleep 1 -fn_check_tmux +check_tmux.sh tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then fn_printoknl "Starting" @@ -40,7 +40,7 @@ else while true; do read -p "Do you want to start the server? [y/N]" yn case $yn in - [Yy]* ) fn_start; break;; + [Yy]* ) command_start.sh; break;; [Nn]* ) break;; * ) echo "Please answer yes or no.";; esac diff --git a/functions/command_debug b/functions/command_debug deleted file mode 100644 index 59f685098..000000000 --- a/functions/command_debug +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# LGSM fn_debug function -# Author: Daniel Gibbs -# Website: http://gameservermanagers.com -lgsm_version="061115" - -# Description: Runs the server without tmux. Runs direct from the terminal. -local cmd="debug" -local modulename="Debug" -check.sh -fn_check_ip -fn_check_logs -fn_details_distro -fn_parms -echo "" -echo "${gamename} Debug" -echo "============================" -echo "" -echo -e "Distro: ${os}" -echo -e "Arch: ${arch}" -echo -e "Kernel: ${kernel}" -echo -e "Hostname: $HOSTNAME" -echo "" -echo "Start parameters:" -if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then - echo "${executable} ${parms} -debug" -else - echo "${executable} ${parms}" -fi -echo "" -echo -e "Use for identifying server issues only!" -echo -e "Press CTRL+c to drop out of debug mode." -fn_printwarningnl "If ${servicename} is already running it will be stopped." -echo "" -while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; return;; - * ) echo "Please answer yes or no.";; -esac -done -fn_scriptlog "Starting debug" -fn_printinfonl "Stopping any running servers" -fn_scriptlog "Stopping any running servers" -sleep 1 -fn_stop -fn_printdots "Starting debug" -sleep 1 -fn_printok "Starting debug" -fn_scriptlog "Started debug" -sleep 1 -echo -en "\n" -cd "${executabledir}" -if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then - if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then - startfix=1 - fn_csgofix - elif [ "${gamename}" == "Insurgency" ]; then - fn_insfix - elif [ "${gamename}" == "ARMA 3" ]; then - fn_arma3fix - fi - ${executable} ${parms} -debug -else - ${executable} ${parms} -fi \ No newline at end of file diff --git a/functions/command_debug.sh b/functions/command_debug.sh index 39399f52c..a231b8000 100644 --- a/functions/command_debug.sh +++ b/functions/command_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_debug function +# LGSM command_debug.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -9,9 +9,9 @@ lgsm_version="061115" local modulename="Debug" check_root.sh fn_check_systemdir -fn_check_ip -fn_check_logs -fn_details_distro +check_ip.sh +check_logs.sh +info_distro.sh fn_parms echo "" echo "${gamename} Debug" @@ -45,7 +45,7 @@ fn_scriptlog "Starting debug" fn_printinfonl "Stopping any running servers" fn_scriptlog "Stopping any running servers" sleep 1 -fn_stop +command_stop.sh fn_printdots "Starting debug" sleep 1 fn_printok "Starting debug" @@ -56,11 +56,11 @@ cd "${executabledir}" if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then startfix=1 - fn_csgofix + fix_csgo.sh elif [ "${gamename}" == "Insurgency" ]; then - fn_insfix + fix_ins.sh elif [ "${gamename}" == "ARMA 3" ]; then - fn_arma3fix + fix_arma3.sh fi ${executable} ${parms} -debug else diff --git a/functions/command_details.sh b/functions/command_details.sh index 40904b283..81242bca6 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_details function +# LGSM command_details.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="211215" @@ -9,7 +9,7 @@ lgsm_version="211215" # Standard Details # This applies to all engines -fn_details_os(){ +command_details.sh_os(){ echo -e "" echo -e "\e[93mDistro Details\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -23,7 +23,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = } | column -s $'\t' -t } -fn_details_performance(){ +command_details.sh_performance(){ echo -e "" echo -e "\e[93mPerformance\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -39,7 +39,7 @@ echo -e "" } | column -s $'\t' -t } -fn_details_disk(){ +command_details.sh_disk(){ echo -e "" echo -e "\e[93mStorage\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -55,7 +55,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = } | column -s $'\t' -t } -fn_details_gameserver(){ +command_details.sh_gameserver(){ echo -e "" ## server details @@ -105,7 +105,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = # online status if [ "${gamename}" == "Teamspeak 3" ]; then - fn_check_ts3status + check_ts3status.sh if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" else @@ -180,7 +180,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = } | column -s $'\t' -t } -fn_details_backup(){ +command_details.sh_backup(){ echo -e "" echo -e "\e[92mBackups\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -197,14 +197,14 @@ else fi } -fn_details_commandlineparms(){ +command_details.sh_commandlineparms(){ echo -e "" echo -e "\e[92mCommand-line Parameters\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "${executable} ${parms}" } -fn_details_statusbottom(){ +command_details.sh_statusbottom(){ echo -e "" if [ "${gamename}" == "Teamspeak 3" ]; then if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then @@ -225,15 +225,15 @@ echo -e "" # Engine Specific details -fn_details_avalanche(){ -fn_check_ip -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup +command_details.sh_avalanche(){ +check_ip.sh +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -248,18 +248,18 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_dontstarve(){ -fn_check_ip -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup +command_details.sh_dontstarve(){ +check_ip.sh +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -274,18 +274,18 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_projectzomboid(){ -fn_check_ip -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup +command_details.sh_projectzomboid(){ +check_ip.sh +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -300,21 +300,21 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_realvirtuality(){ -fn_check_ip +command_details.sh_realvirtuality(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -335,20 +335,20 @@ fi echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_seriousengine35(){ -fn_check_ip +command_details.sh_seriousengine35(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -364,20 +364,20 @@ echo -e "" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_source(){ -fn_check_ip +command_details.sh_source(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -396,20 +396,20 @@ echo -e "" echo -e "< Client\tOUTBOUND\t${clientport}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_spark(){ -fn_check_ip +command_details.sh_spark(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -434,20 +434,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_starbound(){ -fn_check_ip +command_details.sh_starbound(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -464,19 +464,19 @@ echo -e "" echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_teamspeak3(){ -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +command_details.sh_teamspeak3(){ +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -493,20 +493,20 @@ echo -e "" echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_teeworlds(){ -fn_check_ip +command_details.sh_teeworlds(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -521,20 +521,20 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_terraria(){ -fn_check_ip +command_details.sh_terraria(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -551,20 +551,20 @@ echo -e "" echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_unity3d(){ -fn_check_ip +command_details.sh_unity3d(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -598,20 +598,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_unreal(){ -fn_check_ip +command_details.sh_unreal(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -655,20 +655,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } -fn_details_ark(){ -fn_check_ip +command_details.sh_ark(){ +check_ip.sh fn_parms -fn_details_config -fn_details_distro -fn_details_os -fn_details_performance -fn_details_disk -fn_details_gameserver -fn_details_backup -fn_details_commandlineparms +info_config.sh +info_distro.sh +command_details.sh_os +command_details.sh_performance +command_details.sh_disk +command_details.sh_gameserver +command_details.sh_backup +command_details.sh_commandlineparms echo -e "" echo -e "\e[92mPorts\e[0m" printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = @@ -684,7 +684,7 @@ echo -e "" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t -fn_details_statusbottom +command_details.sh_statusbottom } if [ ! -e "${servercfgfullpath}" ]; then @@ -701,36 +701,36 @@ if [ ! -e "${servercfgfullpath}" ]; then echo -en " \r" fi -fn_details_glibc +command_details.sh_glibc if [ "${engine}" == "avalanche" ]; then - fn_details_avalanche + command_details.sh_avalanche elif [ "${engine}" == "dontstarve" ]; then - fn_details_dontstarve + command_details.sh_dontstarve elif [ "${engine}" == "projectzomboid" ]; then - fn_details_projectzomboid + command_details.sh_projectzomboid elif [ "${engine}" == "realvirtuality" ]; then - fn_details_realvirtuality + command_details.sh_realvirtuality elif [ "${engine}" == "seriousengine35" ]; then - fn_details_seriousengine35 + command_details.sh_seriousengine35 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then - fn_details_source + command_details.sh_source elif [ "${engine}" == "spark" ]; then - fn_details_spark + command_details.sh_spark elif [ "${engine}" == "starbound" ]; then - fn_details_starbound + command_details.sh_starbound elif [ "${engine}" == "teeworlds" ]; then - fn_details_teeworlds + command_details.sh_teeworlds elif [ "${engine}" == "terraria" ]; then - fn_details_terraria + command_details.sh_terraria elif [ "${engine}" == "unity3d" ]; then - fn_details_unity3d + command_details.sh_unity3d elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then - fn_details_unreal + command_details.sh_unreal elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then - fn_details_ark + command_details.sh_ark elif [ "${gamename}" == "Teamspeak 3" ]; then - fn_details_teamspeak3 + command_details.sh_teamspeak3 else fn_printerrornl "Unable to detect server engine." fi diff --git a/functions/command_install.sh b/functions/command_install.sh index 5cba3b51b..db77c9d87 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -5,42 +5,42 @@ lgsm_version="201215" check_root.sh -fn_install_header -fn_install_serverdir +install_header.sh +install_serverdir.sh # Download and install if [ "${gamename}" == "Unreal Tournament 2004" ]; then - fn_install_ut2k4filesdl - fn_install_ut2k4 - fn_install_ut2k4key + install_dl_ut2k4.sh + install_ut2k4.sh + install_ut2k4_key.sh elif [ "${gamename}" == "Unreal Tournament 99" ]; then - fn_install_ut99filesdl - fn_install_ut99 + install_dl_ut99.sh + install_ut99.sh elif [ "${gamename}" == "Teamspeak 3" ]; then - fn_install_ts3 + install_ts3.sh elif [ ! -z "${appid}" ]; then fn_install_steamcmd - fn_install_serverfiles - fn_install_steamfix + finstall_serverfiles.sh + install_steamfix.sh fi # Configuration -fn_install_glibcfix -fn_install_logs -fn_install_gsquery -fn_install_config +fix_glibc.sh +install_logs.sh +install_gsquery.sh +install_config.sh if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then - fn_install_gslt - fn_csgofix + install_gslt.sh + fix_csgo.sh elif [ "${gamename}" == "Team Fortress 2" ]; then - fn_install_gslt + install_gslt.sh elif [ "${gamename}" == "Killing Floor" ]; then - fn_install_kffix + install_fix_kf.sh elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then - fn_install_rofix + install_fix_ro.sh elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - fn_install_ut2k4fix + install_fix_ut2k4.sh elif [ "${gamename}" == "Unreal Tournament 99" ]; then - fn_install_ut99fix + install_fix_ut99.sh fi -fn_install_complete \ No newline at end of file +install_complete.sh \ No newline at end of file diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index 6ea75a020..3fcb3a88c 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -1,18 +1,18 @@ #!/bin/bash -# LGSM fn_monitor function +# LGSM command_monitor.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" # Description: Monitors server by checking for running proccesses -# then passes to fn_monitor_query. +# then passes to monitor_gsquery.sh. local modulename="Monitor" -fn_monitor_teamspeak3(){ +command_monitor.sh_teamspeak3(){ check_root.sh fn_check_systemdir -fn_logs +logs.sh fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 @@ -27,7 +27,7 @@ fi fn_printdots "Checking session: CHECKING" fn_scriptlog "Checking session: CHECKING" sleep 1 -fn_check_ts3status +check_ts3status.sh if [ "${ts3status}" = "Server is running" ]; then fn_printok "Checking session: OK" fn_scriptlog "Checking session: OK" @@ -45,7 +45,7 @@ else if [ "${emailnotification}" = "on" ]; then subject="${servicename} Monitor - Restarting ${servername}" actiontaken="restarted ${servername}" - fn_emailnotification + email.shnotification fi fi sleep 0.5 @@ -53,11 +53,11 @@ echo -en "\n" fn_restart } -fn_monitor_tmux(){ +command_monitor.sh_tmux(){ check_root.sh fn_check_systemdir -fn_check_ip -fn_details_config +check_ip.sh +info_config.sh fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 @@ -83,7 +83,7 @@ if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "$ echo -en "\n" if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then - fn_monitor_query + monitor_gsquery.sh fi exit $? else @@ -95,10 +95,10 @@ if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "$ subject="${servicename} Monitor - Starting ${servername}" failurereason="${servicename} process not running" actiontaken="${servicename} has been restarted" - fn_email + email.sh fi fn_scriptlog "Monitor is starting ${servername}" - fn_start + command_start.sh fi else fn_printinfonl "SteamCMD is currently checking for updates" @@ -111,7 +111,7 @@ fi } if [ "${gamename}" == "Teamspeak 3" ]; then - fn_monitor_teamspeak3 + command_monitor.sh_teamspeak3 else - fn_monitor_tmux + command_monitor.sh_tmux fi diff --git a/functions/command_start.sh b/functions/command_start.sh index 96193e286..def922be3 100644 --- a/functions/command_start.sh +++ b/functions/command_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_start function +# LGSM command_start.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -8,16 +8,16 @@ lgsm_version="201215" local modulename="Starting" -fn_start_teamspeak3(){ +command_start.sh_teamspeak3(){ check_root.sh fn_check_systemdir -fn_check_logs -fn_check_ts3status +check_logs.sh +check_ts3status.sh if [ "${ts3status}" != "Server is running" ]; then # Will check for updates is updateonstart is yes if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then - fn_update_check + update_check.sh fi fi @@ -38,7 +38,7 @@ if [ ! -e "${servercfgfullpath}" ]; then touch "${servercfgfullpath}" fi -fn_logs +logs.sh fn_printdots "${servername}" fn_scriptlog "${servername}" @@ -58,7 +58,7 @@ date > "${rootdir}/${lockselfname}" cd "${executabledir}" ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 sleep 1 -fn_check_ts3status +check_ts3status.sh if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then fn_printfailnl "Unable to start ${servername}" fn_scriptlog "Unable to start ${servername}" @@ -72,39 +72,39 @@ sleep 0.5 echo -en "\n" } -fn_start_tmux(){ +command_start.sh_tmux(){ check_root.sh fn_check_systemdir -fn_check_ip -fn_check_logs +check_ip.sh +check_logs.sh if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then startfix=1 - fn_csgofix + fix_csgo.sh elif [ "${gamename}" == "Insurgency" ]; then - fn_insfix + fix_ins.sh elif [ "${gamename}" == "ARMA 3" ]; then - fn_arma3fix + fix_arma3.sh fi -fn_details_config +info_config.sh fn_parms -fn_logs +logs.sh tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") # Will check for updates if updateonstart is yes if [ "${tmuxwc}" -eq 0 ]; then if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then - fn_update_check + update_check.sh fi fi fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 -fn_check_tmux +check_tmux.sh if [ "${gamename}" != "Mumble" ]; then - fn_check_steamcmd + check_steamcmd.sh fi if [ "${tmuxwc}" -eq 0 ]; then @@ -201,7 +201,7 @@ echo -en "\n" } if [ "${gamename}" == "Teamspeak 3" ]; then - fn_start_teamspeak3 + command_start.sh_teamspeak3 else - fn_start_tmux + command_start.sh_tmux fi diff --git a/functions/command_stop.sh b/functions/command_stop.sh index 68b2d002e..a0b72ec23 100644 --- a/functions/command_stop.sh +++ b/functions/command_stop.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_stop function +# LGSM command_stop.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -28,13 +28,13 @@ sdtd_telnet(){ ') } -fn_stop_teamspeak3(){ +command_stop.sh_teamspeak3(){ check_root.sh fn_check_systemdir fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 -fn_check_ts3status +check_ts3status.sh if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then fn_printfail "${servername} is already stopped" fn_scriptlog "${servername} is already stopped" @@ -49,14 +49,14 @@ sleep 1 echo -en "\n" } -fn_stop_tmux(){ +command_stop.sh_tmux(){ check_root.sh fn_check_systemdir -fn_details_config +info_config.sh fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 -fn_check_tmux +check_tmux.sh if [ "${gamename}" == "7 Days To Die" ] ; then # if game is 7 Days To Die, we need special, graceful shutdown via telnet connection. @@ -70,7 +70,7 @@ if [ "${gamename}" == "7 Days To Die" ] ; then # If failed using localhost will use servers ip refused=$(echo -en "\n ${sdtdshutdown}"| grep "Timeout or EOF") if [ -n "${refused}" ]; then - fn_check_ip + check_ip.sh telnetip=${ip} fn_printwarn "Attempting graceful shutdown via telnet: localhost failed" fn_scriptlog "Warning! Attempting graceful shutdown failed using localhost" @@ -156,7 +156,7 @@ fi } if [ "${gamename}" == "Teamspeak 3" ]; then - fn_stop_teamspeak3 + command_stop.sh_teamspeak3 else - fn_stop_tmux + command_stop.sh_tmux fi \ No newline at end of file diff --git a/functions/command_validate.sh b/functions/command_validate.sh index b4299bc8c..221d6e401 100644 --- a/functions/command_validate.sh +++ b/functions/command_validate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_validate function +# LGSM command_validate.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -9,8 +9,8 @@ lgsm_version="201215" local modulename="Validate" fn_validation(){ -fn_check_steamcmd -fn_check_steamuser +check_steamcmd.sh +check_steamuser.sh fn_printwarn "Validating may overwrite some customised files." sleep 1 echo -en "\n" @@ -37,7 +37,7 @@ fi if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then echo -e '\n' - fn_csgofix + fix_csgo.sh fi fn_scriptlog "Checking complete" } @@ -46,9 +46,9 @@ fn_check_root fn_check_systemdir tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then - fn_stop + command_stop.sh fn_validation - fn_start + command_start.sh else fn_validation fi diff --git a/functions/compress_unreal2_maps.sh b/functions/compress_unreal2_maps.sh index aa9c5d0ad..7b185bd52 100644 --- a/functions/compress_unreal2_maps.sh +++ b/functions/compress_unreal2_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_compress_unreal2maps function +# LGSM compress_unreal2_maps.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/compress_ut99_maps.sh b/functions/compress_ut99_maps.sh index b5a1a04d0..7bef3c360 100644 --- a/functions/compress_ut99_maps.sh +++ b/functions/compress_ut99_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_compress_ut99maps function +# LGSM compress_ut99_maps.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/core_functions.sh b/functions/core_functions.sh index bfa6cbb42..408d1cf10 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -7,12 +7,17 @@ lgsm_version="201215" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. -fn_arma3fix(){ +fix_arma3.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_backup(){ +command_backup.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + +check.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -32,12 +37,12 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_steamcmd(){ +check_steamcmd.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_steamuser(){ +check_steamuser.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -47,32 +52,32 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_tmux(){ +check_tmux.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_check_ts3status(){ +check_ts3status.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_console(){ +command_console.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_compress_unreal2maps(){ +compress_unreal2_maps.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_compress_ut99maps(){ +compress_ut99_maps.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_csgofix(){ +fix_csgo.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -82,42 +87,42 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_details(){ +command_details.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_details_config(){ +info_config.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_details_distro(){ +info_distro.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_details_glibc(){ +command_details.sh_glibc(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_debug_dev(){ +dev_debug.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_deps_detect(){ +dev_detect_deps.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_email(){ +email.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_email_test(){ +email_test.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -127,12 +132,12 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_insfix(){ +fix_ins.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_logs(){ +logs.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -142,55 +147,55 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_monitor(){ +command_monitor.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_monitor_query(){ +monitor_gsquery.sh(){ functionfile="${FUNCNAME}" fn_runfunction } fn_restart(){ local modulename="Restarting" -fn_details_config +info_config.sh fn_scriptlog "${servername}" -fn_stop -fn_start +command_stop.sh +command_start.sh } -fn_start(){ +command_start.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_stop(){ +command_stop.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_update_check(){ +update_check.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_update_functions(){ +update_functions.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_update_dl(){ +update_dl.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_update_functions(){ +update_functions.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_validate(){ +command_validate.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -209,112 +214,111 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_complete(){ +install_complete.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_config(){ +install_config.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_glibcfix(){ +fix_glibc.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_gsquery(){ +install_gsquery.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_gslt(){ +install_gslt.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_header(){ +install_header.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_kffix(){ +install_fix_kf.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_logs(){ +install_logs.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_retry(){ +install_retry.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_rofix(){ +install_fix_ro.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_serverdir(){ +install_serverdir.sh(){ functionfile="${FUNCNAME}" fn_runfunction } - -fn_install_serverfiles(){ +install_serverfiles.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_steamcmd(){ +install_steamcmd.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_steamfix(){ +install_steamfix.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ts3(){ +install_ts3.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut2k4(){ +install_ut2k4.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut2k4filesdl(){ +install_dl_ut2k4.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut2k4fix(){ +install_fix_ut2k4.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut2k4key(){ +install_ut2k4_key.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut99(){ +install_ut99.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut99filesdl(){ +install_dl_ut99.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_install_ut99fix(){ +install_fix_ut99.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index 3e9f15c81..454871c5b 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -9,40 +9,40 @@ lgsm_version="061115" fn_getopt_generic(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; u|update) - fn_update_check;; + update_check.sh;; fu|force-update|update-restart) forceupdate=1; - fn_update_check;; + update_check.sh;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; v|validate) - fn_validate;; + command_validate.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; c|console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; ai|auto-install) fn_autoinstall;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" @@ -73,31 +73,31 @@ exit fn_getopt_teamspeak3(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; u|update) - fn_update_check;; + update_check.sh;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; ai|auto-install) fn_autoinstall;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" @@ -124,27 +124,27 @@ exit fn_getopt_mumble(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; b|backup) fn_backup;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" @@ -169,40 +169,40 @@ exit fn_getopt_gmodserver(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; u|update) - fn_update_check;; + update_check.sh;; fu|force-update|update-restart) forceupdate=1; - fn_update_check;; + update_check.sh;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; v|validate) - fn_validate;; + command_validate.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; c|console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; ai|auto-install) fn_autoinstall;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; gc|gmod-content) fn_content_gmod;; *) @@ -236,33 +236,33 @@ exit fn_getopt_unreal(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; c|console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; mc|map-compressor) - fn_compress_ut99maps;; + compress_ut99_maps.sh;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" @@ -291,42 +291,42 @@ exit fn_getopt_unreal2(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; u|update) - fn_update_check;; + update_check.sh;; fu|force-update|update-restart) forceupdate=1; - fn_update_check;; + update_check.sh;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; v|validate) - fn_validate;; + command_validate.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; c|console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; ai|auto-install) fn_autoinstall;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; mc|map-compressor) - fn_compress_unreal2maps;; + compress_unreal2_maps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" @@ -359,33 +359,33 @@ exit fn_getopt_ut2k4(){ case "$getopt" in st|start) - fn_start;; + command_start.sh;; sp|stop) - fn_stop;; + command_stop.sh;; r|restart) fn_restart;; uf|update-functions) - fn_update_functions;; + update_functions.sh;; m|monitor) - fn_monitor;; + command_monitor.sh;; et|email-test) - fn_email_test;; + email_test.sh;; d|details) - fn_details;; + command_details.sh;; b|backup) fn_backup;; c|console) - fn_console;; + command_console.sh;; d|debug) command_debug.sh;; dev|dev-debug) - command_debug.sh_dev;; + dev_debug.sh;; i|install) fn_install;; mc|map-compressor) - fn_compress_ut99maps;; + compress_ut99_maps.sh;; dd|depsdetect) - fn_deps_detect;; + dev_detect_deps.sh;; *) echo "Usage: $0 [option]" echo "${gamename} - Linux Game Server Manager - Version ${version}" diff --git a/functions/dev_debug.sh b/functions/dev_debug.sh index 3e4b14d8c..73a4cc4cf 100644 --- a/functions/dev_debug.sh +++ b/functions/dev_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_debug_dev function +# LGSM dev_debug.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/email.sh b/functions/email.sh index e24c5eb75..75b0d66cf 100644 --- a/functions/email.sh +++ b/functions/email.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_email function +# LGSM email.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -9,7 +9,7 @@ lgsm_version="061115" local modulename="Email" fn_printdots "Sending notification to ${email}" echo -en "\n" -fn_details_distro +info_distro.sh { echo -e "========================================\n${servicename} details\n========================================\n" echo -e "Service: ${servicename}" @@ -27,7 +27,7 @@ fn_details_distro echo -e "Avg Load${load}\n" echo -e "========================================\nLogs\n========================================\n" echo -e "Script log\n===================\n" - fn_details + command_details.sh }|sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"|tee "${scriptlogdir}/${servicename}-email.log" tail -25 "${scriptlog}" >> "${emaillog}" if [ ! -z "${consolelog}" ]; then diff --git a/functions/email_test.sh b/functions/email_test.sh index 226c980f5..f067a6c65 100644 --- a/functions/email_test.sh +++ b/functions/email_test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_email_test function +# LGSM email_test.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -9,13 +9,13 @@ lgsm_version="061115" local modulename="Email" check_root.sh fn_check_systemdir -fn_details_config +info_config.sh if [ "${emailnotification}" = "on" ]; then fn_scriptlog "Sending test notification" subject="${servicename} Email Test Notification - Testing ${servername}" failurereason="Testing ${servicename} email notification" actiontaken="Sent test email...hello is this thing on?" - fn_email + email.sh else fn_printfailnl "Notifications not enabled" fn_scriptlog "Notifications not enabled" diff --git a/functions/fix_arma3.sh b/functions/fix_arma3.sh index 756600e96..5dd392295 100644 --- a/functions/fix_arma3.sh +++ b/functions/fix_arma3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_arma3fix function +# LGSM fix_arma3.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/fix_csgo.sh b/functions/fix_csgo.sh index 7a055fdb2..43b3bef1e 100644 --- a/functions/fix_csgo.sh +++ b/functions/fix_csgo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_csgofix function +# LGSM fix_csgo.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -19,7 +19,7 @@ if [ ! -f "${filesdir}/steam_appid.txt" ]; then fi } -fn_csgofixes(){ +fix_csgo.shes(){ # Fixes the following error: # Error parsing BotProfile.db - unknown attribute 'Rank". if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then @@ -84,5 +84,5 @@ fi if [ ! -z "${startfix}" ]; then fn_csgoappfix else - fn_csgofixes + fix_csgo.shes fi \ No newline at end of file diff --git a/functions/fix_glibc.sh b/functions/fix_glibc.sh index 0db2c48eb..abd23db4f 100644 --- a/functions/fix_glibc.sh +++ b/functions/fix_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_glibcfix function +# LGSM fix_glibc.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/fix_ins.sh b/functions/fix_ins.sh index 9d8c0041d..80f116080 100644 --- a/functions/fix_ins.sh +++ b/functions/fix_ins.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_insfix function +# LGSM fix_ins.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/info_config.sh b/functions/info_config.sh index d24751f81..49c702c38 100644 --- a/functions/info_config.sh +++ b/functions/info_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_details_config function +# LGSM info_config.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/info_distro.sh b/functions/info_distro.sh index 71a586a0f..3a8def74e 100644 --- a/functions/info_distro.sh +++ b/functions/info_distro.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LGSM fn_details_distro function +# LGSM info_distro.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="211215" # Description: Variables providing useful info on the Operating System such as disk and performace info. -# Used for fn_details, fn_debug and fn_email. +# Used for command_details.sh, command_debug.sh and email.sh. ## Distro infomation # Returns architecture, kernel and distro/os. diff --git a/functions/info_glibc.sh b/functions/info_glibc.sh index dc6efb427..5a7fb65ad 100644 --- a/functions/info_glibc.sh +++ b/functions/info_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_details_glibc function +# LGSM command_details.sh_glibc function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/info_ts3status.sh b/functions/info_ts3status.sh index 6cabddb3b..b7578fef2 100644 --- a/functions/info_ts3status.sh +++ b/functions/info_ts3status.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_ts3status function +# LGSM check_ts3status.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_complete.sh b/functions/install_complete.sh index a9690d5ac..6e0dfad47 100644 --- a/functions/install_complete.sh +++ b/functions/install_complete.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_complete function +# LGSM install_complete.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_config.sh b/functions/install_config.sh index 2a0311634..5eb37a473 100644 --- a/functions/install_config.sh +++ b/functions/install_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_config function +# LGSM install_config.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/install_dl_ut2k4.sh b/functions/install_dl_ut2k4.sh index c8cf07f6a..9dd7e3029 100644 --- a/functions/install_dl_ut2k4.sh +++ b/functions/install_dl_ut2k4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut2k4filesdl function +# LGSM install_dl_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -21,7 +21,7 @@ if [ "${md5check}" != "d3f28c5245c4c02802d48e4f0ffd3e34" ]; then echo "MD5 checksum: FAILED!" read -p "Retry download? [y/N]" yn case $yn in - [Yy]* ) rm -fv dedicatedserver3339-bonuspack.zip; fn_install_ut2k4filesdl;; + [Yy]* ) rm -fv dedicatedserver3339-bonuspack.zip; install_dl_ut2k4.sh;; [Nn]* ) echo Exiting; exit;; * ) echo "Please answer yes or no.";; esac @@ -42,7 +42,7 @@ if [ "${md5check}" != "0fa447e05fe5a38e0e32adf171be405e" ]; then echo "MD5 checksum: FAILED!" read -p "Retry download? [y/N]" yn case $yn in - [Yy]* ) rm -fv ut2004-lnxpatch3369-2.tar.bz2; fn_install_ut2k4filesdl;; + [Yy]* ) rm -fv ut2004-lnxpatch3369-2.tar.bz2; install_dl_ut2k4.sh;; [Nn]* ) echo Exiting; exit;; * ) echo "Please answer yes or no.";; esac diff --git a/functions/install_dl_ut99.sh b/functions/install_dl_ut99.sh index 364c34865..f0982bce4 100644 --- a/functions/install_dl_ut99.sh +++ b/functions/install_dl_ut99.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut99filesdl function +# LGSM install_dl_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_fix_kf.sh b/functions/install_fix_kf.sh index b3e484a2f..623f2c8a4 100644 --- a/functions/install_fix_kf.sh +++ b/functions/install_fix_kf.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_kffix function +# LGSM install_fix_kf.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -19,9 +19,9 @@ echo "applying server name fix." sleep 1 echo "forcing server restart..." sleep 1 -fn_start +command_start.sh sleep 5 -fn_stop -fn_start +command_stop.sh +command_start.sh sleep 5 -fn_stop \ No newline at end of file +command_stop.sh \ No newline at end of file diff --git a/functions/install_fix_ro.sh b/functions/install_fix_ro.sh index 9e636d50b..9525730c0 100644 --- a/functions/install_fix_ro.sh +++ b/functions/install_fix_ro.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_rofix function +# LGSM install_fix_ro.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -19,9 +19,9 @@ echo "applying server name fix." sleep 1 echo "forcing server restart..." sleep 1 -fn_start +command_start.sh sleep 5 -fn_stop -fn_start +command_stop.sh +command_start.sh sleep 5 -fn_stop \ No newline at end of file +command_stop.sh \ No newline at end of file diff --git a/functions/install_fix_steam.sh b/functions/install_fix_steam.sh index e977b0f11..8d5906375 100644 --- a/functions/install_fix_steam.sh +++ b/functions/install_fix_steam.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_steamfix function +# LGSM install_steamfix.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/install_fix_ut2k4.sh b/functions/install_fix_ut2k4.sh index 825f4e703..61ec724fd 100644 --- a/functions/install_fix_ut2k4.sh +++ b/functions/install_fix_ut2k4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut2k4fix function +# LGSM install_fix_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -24,9 +24,9 @@ echo -en "forcing server restart...\r" sleep 0.5 echo -en "\n" sleep 0.5 -fn_start +command_start.sh sleep 5 -fn_stop -fn_start +command_stop.sh +command_start.sh sleep 5 -fn_stop \ No newline at end of file +command_stop.sh \ No newline at end of file diff --git a/functions/install_fix_ut99.sh b/functions/install_fix_ut99.sh index 1147934b0..6dc439539 100644 --- a/functions/install_fix_ut99.sh +++ b/functions/install_fix_ut99.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut99fix function +# LGSM install_fix_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_gslt.sh b/functions/install_gslt.sh index e03b356b1..2a697b5f9 100644 --- a/functions/install_gslt.sh +++ b/functions/install_gslt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_gslt function +# LGSM install_gslt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="091215" diff --git a/functions/install_gsquery.sh b/functions/install_gsquery.sh index 3f5bfcebf..9ba42c928 100644 --- a/functions/install_gsquery.sh +++ b/functions/install_gsquery.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_gsquery function +# LGSM install_gsquery.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_header.sh b/functions/install_header.sh index c8c79e835..1e467d9e6 100644 --- a/functions/install_header.sh +++ b/functions/install_header.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_header function +# LGSM install_header.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/install_logs.sh b/functions/install_logs.sh index 7cb81e9ab..968b396d6 100644 --- a/functions/install_logs.sh +++ b/functions/install_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_logs function +# LGSM install_logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_retry.sh b/functions/install_retry.sh index e7a90cbb8..8405f7393 100644 --- a/functions/install_retry.sh +++ b/functions/install_retry.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_retry function +# LGSM install_retry.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_serverdir.sh b/functions/install_serverdir.sh index 1322cd7b0..87c34a435 100644 --- a/functions/install_serverdir.sh +++ b/functions/install_serverdir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_serverdir function +# LGSM install_serverdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/install_serverfiles.sh b/functions/install_serverfiles.sh index 295a586d1..7842350d9 100644 --- a/functions/install_serverfiles.sh +++ b/functions/install_serverfiles.sh @@ -1,13 +1,13 @@ #!/bin/bash -# LGSM fn_install_serverfiles function +# LGSM finstall_serverfiles.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" fn_steaminstallcommand(){ -fn_check_steamuser +check_steamuser.sh counter="0" -while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .fn_install_serverfiles.tmp)" -ge "1" ]; do +while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .finstall_serverfiles.sh.tmp)" -ge "1" ]; do counter=$((counter+1)) cd "${rootdir}/steamcmd" if [ "${counter}" -le "10" ]; then @@ -27,7 +27,7 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" fi if [ "${counter}" -ge "9" ]; then rm -rf "${rootdir}/steamcmd" - fn_check_steamcmd + check_steamcmd.sh fi # Detects if unbuffer command is available. @@ -37,15 +37,15 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" if [ "${counter}" -le "4" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit |tee .finstall_serverfiles.sh.tmp else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .finstall_serverfiles.sh.tmp fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp fi fi elif [ "${counter}" -ge "11" ]; then @@ -61,10 +61,10 @@ if [ "${engine}" == "goldsource" ]; then counter="0" while [ "${counter}" -le "4" ]; do counter=$((counter+1)) - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp done fi -rm -f .fn_install_serverfiles.tmp +rm -f .finstall_serverfiles.sh.tmp } echo "" @@ -80,7 +80,7 @@ if [ -z "${autoinstall}" ]; then read -e -i "y" -p "Was the install successful? [Y/n]" yn case $yn in [Yy]* ) break;; - [Nn]* ) fn_install_retry;; + [Nn]* ) install_retry.sh;; * ) echo "Please answer yes or no.";; esac done diff --git a/functions/install_ts3 b/functions/install_ts3 index 26f7a7724..48f04f578 100644 --- a/functions/install_ts3 +++ b/functions/install_ts3 @@ -1,10 +1,10 @@ #!/bin/bash -# LGSM fn_install_ts3 function +# LGSM install_ts3.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" -fn_details_distro +info_distro.sh # Gets the teamspeak server architecture if [ "${arch}" == "x86_64" ]; then ts3arch="amd64" diff --git a/functions/install_ut2k4.sh b/functions/install_ut2k4.sh index a76cc3e19..ef432196f 100644 --- a/functions/install_ut2k4.sh +++ b/functions/install_ut2k4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut2k4 function +# LGSM install_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -18,7 +18,7 @@ while true; do read -p "Was the install successful? [y/N]" yn case $yn in [Yy]* ) break;; - [Nn]* ) fn_install_retry;; + [Nn]* ) install_retry.sh;; * ) echo "Please answer yes or no.";; esac done diff --git a/functions/install_ut2k4_key.sh b/functions/install_ut2k4_key.sh index 63e7c58be..41658391d 100644 --- a/functions/install_ut2k4_key.sh +++ b/functions/install_ut2k4_key.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut2k4key function +# LGSM install_ut2k4_key.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/install_ut99.sh b/functions/install_ut99.sh index f37472880..ce894abfc 100644 --- a/functions/install_ut99.sh +++ b/functions/install_ut99.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_ut99 function +# LGSM install_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -18,7 +18,7 @@ while true; do read -p "Was the install successful? [y/N]" yn case $yn in [Yy]* ) break;; - [Nn]* ) fn_install_retry;; + [Nn]* ) install_retry.sh;; * ) echo "Please answer yes or no.";; esac done diff --git a/functions/logs.sh b/functions/logs.sh index d5b650bc0..5afde8c2c 100644 --- a/functions/logs.sh +++ b/functions/logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_logs function +# LGSM logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/monitor_gsquery.sh b/functions/monitor_gsquery.sh index b75c6dba6..90c14be36 100644 --- a/functions/monitor_gsquery.sh +++ b/functions/monitor_gsquery.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_monitor_query function +# LGSM monitor_gsquery.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -46,14 +46,14 @@ if [ -f "${rootdir}/gsquery.py" ]; then sleep 30 fi secondquery=1 - fn_monitor_query + monitor_gsquery.sh fi if [ "${emailnotification}" = "on" ]; then - fn_details_config + info_config.sh subject="${servicename} Monitor - Starting ${servername}" failurereason="Failed to query ${servicename}: ${serverquery}" actiontaken="restarted ${servicename}" - fn_email + email.sh fi fn_restart exit 1 @@ -71,7 +71,7 @@ if [ -f "${rootdir}/gsquery.py" ]; then echo "Attempting to resolve automatically" chmod +x -v "${rootdir}/gsquery.py" if [ $? -eq 0 ]; then - fn_monitor_query + monitor_gsquery.sh else fn_printfailure "Unable to resolve automatically. Please manually fix permissions.\n" owner=$(ls -al ${rootdir}/gsquery.py|awk '{ print $3 }') diff --git a/functions/update_check.sh b/functions/update_check.sh index 551f4f4aa..ff2a1c9d9 100644 --- a/functions/update_check.sh +++ b/functions/update_check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_update_check function +# LGSM update_check.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -49,8 +49,8 @@ if [ "${appmanifestfilewc}" -ge "2" ]; then fn_printinfonl "Forcing update to correct issue" fn_scriptlog "Forcing update to correct issue" sleep 1 - fn_update_dl - fn_update_check + update_dl.sh + update_check.sh fi elif [ "${appmanifestfilewc}" -eq "0" ]; then if [ "${forceupdate}" == "1" ]; then @@ -65,8 +65,8 @@ elif [ "${appmanifestfilewc}" -eq "0" ]; then fn_printinfonl "Forcing update to correct issue" fn_scriptlog "Forcing update to correct issue" sleep 1 - fn_update_dl - fn_update_check + update_dl.sh + update_check.sh fi } @@ -89,11 +89,11 @@ if [ "${requestrestart}" -ge "1" ]; then echo -ne "\n" tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then - fn_stop - fn_update_dl - fn_start + command_stop.sh + update_dl.sh + command_start.sh else - fn_update_dl + update_dl.sh fi else fn_printok "Checking for update: Server logs: No update requested" @@ -102,8 +102,8 @@ fi } fn_steamcmdcheck(){ -fn_check_steamcmd -fn_check_steamuser +check_steamcmd.sh +check_steamuser.sh fn_appmanifestcheck # Checks for server update from SteamCMD fn_printdots "Checking for update: SteamCMD" @@ -158,11 +158,11 @@ if [ "${currentbuild}" != "${availablebuild}" ]; then tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then - fn_stop - fn_update_dl - fn_start + command_stop.sh + update_dl.sh + command_start.sh else - fn_update_dl + update_dl.sh fi else echo -e "\n" @@ -197,8 +197,8 @@ if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then fn_printinfonl "Checking for update: teamspeak.com: Forcing server restart" fn_scriptlog "Checking for update: teamspeak.com: Forcing server restart" sleep 2 - fn_stop - fn_start + command_stop.sh + command_start.sh sleep 2 # If still failing will exit if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then @@ -274,16 +274,16 @@ if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then fn_scriptlog "Current build: ${currentbuild}" fn_scriptlog "Available build: ${availablebuild}" fn_scriptlog "${currentbuild} > ${availablebuild}" - fn_check_ts3status + check_ts3status.sh if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then - fn_update_dl - fn_start + update_dl.sh + command_start.sh sleep 5 - fn_stop + command_stop.sh else - fn_stop - fn_update_dl - fn_start + command_stop.sh + update_dl.sh + command_start.sh fi else echo -e "\n" @@ -297,7 +297,7 @@ else fi } -fn_check_logs +check_logs.sh fn_printdots "Checking for update" if [ "${gamename}" == "Teamspeak 3" ]; then fn_teamspeak3_check @@ -306,11 +306,11 @@ elif [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then # forceupdate bypasses checks tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then - fn_stop - fn_update_dl - fn_start + command_stop.sh + update_dl.sh + command_start.sh else - fn_update_dl + update_dl.sh fi else fn_logupdaterequest diff --git a/functions/update_dl.sh b/functions/update_dl.sh index 52d72774a..cacd4f1ef 100644 --- a/functions/update_dl.sh +++ b/functions/update_dl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_update_dl function +# LGSM update_dl.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" @@ -11,7 +11,7 @@ local modulename="Update" fn_steamcmd_dl(){ check_root.sh fn_check_systemdir -fn_details_config +info_config.sh fn_printdots "Updating ${servername}" sleep 1 fn_printoknl "Updating ${servername}" @@ -34,14 +34,14 @@ fi if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then echo -e '\n' - fn_csgofix + fix_csgo.sh fi } fn_teamspeak3_dl(){ check_root.sh fn_check_systemdir -fn_details_config +info_config.sh fn_printdots "Updating ${servername}" sleep 1 fn_printoknl "Updating ${servername}" diff --git a/functions/update_functions.sh b/functions/update_functions.sh index c000578d0..55c12a218 100644 --- a/functions/update_functions.sh +++ b/functions/update_functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_update_functions function +# LGSM update_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index c9926eb06..3749027e0 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -118,9 +118,9 @@ fn_setstatus(){ echo -ne "New status: ${currentstatus}\\r" if [ "${requiredstatus}" == "ONLINE" ]; then - (fn_start > /dev/null 2>&1) + (command_start.sh > /dev/null 2>&1) else - (fn_stop > /dev/null 2>&1) + (command_stop.sh > /dev/null 2>&1) fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" @@ -160,7 +160,7 @@ echo "=================================" echo "Description:" echo "test script reaction to missing server files." echo "" -(fn_start) +(command_start.sh) echo "" echo "Test complete!" sleep 1 @@ -196,7 +196,7 @@ echo "Description:" echo "start ${gamename} server." requiredstatus="OFFLINE" fn_setstatus -fn_start +command_start.sh echo "" echo "Test complete!" sleep 1 @@ -207,7 +207,7 @@ echo "Description:" echo "start ${gamename} server while already running." requiredstatus="ONLINE" fn_setstatus -(fn_start) +(command_start.sh) echo "" echo "Test complete!" sleep 1 @@ -220,7 +220,7 @@ requiredstatus="OFFLINE" fn_setstatus ( updateonstart="on" - fn_start + command_start.sh ) echo "" echo "Test complete!" @@ -232,7 +232,7 @@ echo "Description:" echo "stop ${gamename} server." requiredstatus="ONLINE" fn_setstatus -fn_stop +command_stop.sh echo "" echo "Test complete!" sleep 1 @@ -243,7 +243,7 @@ echo "Description:" echo "stop ${gamename} server while already stopped." requiredstatus="OFFLINE" fn_setstatus -(fn_stop) +(command_stop.sh) echo "" echo "Test complete!" sleep 1 @@ -279,7 +279,7 @@ echo "Description:" echo "check for updates." requiredstatus="OFFLINE" fn_setstatus -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -292,7 +292,7 @@ requiredstatus="OFFLINE" fn_setstatus fn_printinfonl "changed buildid to 0." sed -i 's/[0-9]\+/0/' ${filesdir}/steamapps/appmanifest_${appid}.acf -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -305,7 +305,7 @@ requiredstatus="ONLINE" fn_setstatus fn_printinfonl "changed buildid to 0." sed -i 's/[0-9]\+/0/' ${filesdir}/steamapps/appmanifest_${appid}.acf -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -318,7 +318,7 @@ requiredstatus="OFFLINE" fn_setstatus fn_printinfonl "removed appmanifest_${appid}.acf." rm --verbose "${filesdir}/steamapps/appmanifest_${appid}.acf" -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -329,7 +329,7 @@ echo "Description:" echo "force-update bypassing update check." requiredstatus="OFFLINE" fn_setstatus -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -340,7 +340,7 @@ echo "Description:" echo "force-update bypassing update check server while already running." requiredstatus="ONLINE" fn_setstatus -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -351,7 +351,7 @@ echo "Description:" echo "validate server files." requiredstatus="OFFLINE" fn_setstatus -fn_validate +command_validate.sh echo "" echo "Test complete!" sleep 1 @@ -362,7 +362,7 @@ echo "Description:" echo "validate server files while server while already running." requiredstatus="ONLINE" fn_setstatus -fn_validate +command_validate.sh echo "" echo "Test complete!" sleep 1 @@ -376,7 +376,7 @@ echo "Description:" echo "run monitor server while already running." requiredstatus="ONLINE" fn_setstatus -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -387,7 +387,7 @@ echo "Description:" echo "run monitor while server is offline with no lockfile." requiredstatus="OFFLINE" fn_setstatus -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -400,7 +400,7 @@ requiredstatus="OFFLINE" fn_setstatus fn_printinfonl "creating lockfile." date > "${rootdir}/${lockselfname}" -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -412,10 +412,10 @@ echo "gsquery.py will fail to query port." requiredstatus="ONLINE" fn_setstatus sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" -(fn_monitor) +(command_monitor.sh) echo "" fn_printinfonl "Reseting ${servercfg}." -fn_install_config +install_config.sh echo "" echo "Test complete!" sleep 1 @@ -429,7 +429,7 @@ echo "Description:" echo "display details." requiredstatus="ONLINE" fn_setstatus -fn_details +command_details.sh echo "" echo "Test complete!" sleep 1 diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 783f544bb..3d6ec7398 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -101,9 +101,9 @@ fn_setstatus(){ echo -ne "New status: ${currentstatus}\\r" if [ "${requiredstatus}" == "ONLINE" ]; then - (fn_start) + (command_start.sh) else - (fn_stop) + (command_stop.sh) fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" @@ -142,7 +142,7 @@ echo "=================================" echo "Description:" echo "test script reaction to missing server files." echo "" -(fn_start) +(command_start.sh) echo "" echo "Test complete!" sleep 1 @@ -178,7 +178,7 @@ echo "Description:" echo "start ${gamename} server." requiredstatus="OFFLINE" fn_setstatus -fn_start +command_start.sh echo "" echo "Test complete!" sleep 1 @@ -189,7 +189,7 @@ echo "Description:" echo "start ${gamename} server while already running." requiredstatus="ONLINE" fn_setstatus -(fn_start) +(command_start.sh) echo "" echo "Test complete!" sleep 1 @@ -202,7 +202,7 @@ requiredstatus="OFFLINE" fn_setstatus ( updateonstart="on" - fn_start + command_start.sh ) echo "" echo "Test complete!" @@ -214,7 +214,7 @@ echo "Description:" echo "stop ${gamename} server." requiredstatus="ONLINE" fn_setstatus -fn_stop +command_stop.sh echo "" echo "Test complete!" sleep 1 @@ -225,7 +225,7 @@ echo "Description:" echo "stop ${gamename} server while already stopped." requiredstatus="OFFLINE" fn_setstatus -(fn_stop) +(command_stop.sh) echo "" echo "Test complete!" sleep 1 @@ -261,7 +261,7 @@ echo "Description:" echo "check for updates." requiredstatus="OFFLINE" fn_setstatus -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -273,7 +273,7 @@ echo "change the version number tricking LGSM to update." requiredstatus="OFFLINE" sed -i 's/[0-9]\+/0/g' ${gamelogdir}/ts3server*_0.log fn_setstatus -fn_update_check +update_check.sh echo "" echo "Test complete!" sleep 1 @@ -285,7 +285,7 @@ echo "Description:" echo "run monitor server while already running." requiredstatus="ONLINE" fn_setstatus -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -296,7 +296,7 @@ echo "Description:" echo "run monitor while server is offline with no lockfile." requiredstatus="OFFLINE" fn_setstatus -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -309,7 +309,7 @@ requiredstatus="OFFLINE" fn_setstatus fn_printinfonl "creating lockfile." date > "${rootdir}/${lockselfname}" -(fn_monitor) +(command_monitor.sh) echo "" echo "Test complete!" sleep 1 @@ -321,10 +321,10 @@ echo "gsquery.py will fail to query port." requiredstatus="ONLINE" fn_setstatus sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" -(fn_monitor) +(command_monitor.sh) echo "" fn_printinfonl "Reseting ${servercfg}." -fn_install_config +install_config.sh echo "" echo "Test complete!" sleep 1 @@ -338,7 +338,7 @@ echo "Description:" echo "display details." requiredstatus="ONLINE" fn_setstatus -fn_details +command_details.sh echo "" echo "Test complete!" sleep 1 From 95602338a3842adca3941df9e83900669a892f4a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 09:44:17 +0000 Subject: [PATCH 08/45] check_systemdir --- functions/check_systemdir.sh | 2 +- functions/command_backup.sh | 2 +- functions/command_console.sh | 2 +- functions/command_debug.sh | 2 +- functions/command_monitor.sh | 4 ++-- functions/command_start.sh | 4 ++-- functions/command_stop.sh | 4 ++-- functions/command_validate.sh | 2 +- functions/dev_detect_deps.sh | 2 +- functions/email_test.sh | 2 +- functions/update_dl.sh | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/functions/check_systemdir.sh b/functions/check_systemdir.sh index ffd92253a..896ae5bf4 100644 --- a/functions/check_systemdir.sh +++ b/functions/check_systemdir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_check_systemdir function +# LGSM check_systemdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" diff --git a/functions/command_backup.sh b/functions/command_backup.sh index e7bc601e9..60e6b3466 100644 --- a/functions/command_backup.sh +++ b/functions/command_backup.sh @@ -8,7 +8,7 @@ lgsm_version="201215" local modulename="Backup" check_root.sh -fn_check_systemdir +check_systemdir.sh backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')" echo "" echo "${gamename} Backup" diff --git a/functions/command_console.sh b/functions/command_console.sh index fb066e345..490612b9c 100644 --- a/functions/command_console.sh +++ b/functions/command_console.sh @@ -8,7 +8,7 @@ lgsm_version="061115" local modulename="Console" check_root.sh -fn_check_systemdir +check_systemdir.sh echo "" echo "${gamename} Console" echo "============================" diff --git a/functions/command_debug.sh b/functions/command_debug.sh index a231b8000..9404b0c09 100644 --- a/functions/command_debug.sh +++ b/functions/command_debug.sh @@ -8,7 +8,7 @@ lgsm_version="061115" local modulename="Debug" check_root.sh -fn_check_systemdir +check_systemdir.sh check_ip.sh check_logs.sh info_distro.sh diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index 3fcb3a88c..50acfc1d2 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -11,7 +11,7 @@ local modulename="Monitor" command_monitor.sh_teamspeak3(){ check_root.sh -fn_check_systemdir +check_systemdir.sh logs.sh fn_printdots "${servername}" fn_scriptlog "${servername}" @@ -55,7 +55,7 @@ fn_restart command_monitor.sh_tmux(){ check_root.sh -fn_check_systemdir +check_systemdir.sh check_ip.sh info_config.sh fn_printdots "${servername}" diff --git a/functions/command_start.sh b/functions/command_start.sh index def922be3..26358df97 100644 --- a/functions/command_start.sh +++ b/functions/command_start.sh @@ -10,7 +10,7 @@ local modulename="Starting" command_start.sh_teamspeak3(){ check_root.sh -fn_check_systemdir +check_systemdir.sh check_logs.sh check_ts3status.sh @@ -74,7 +74,7 @@ echo -en "\n" command_start.sh_tmux(){ check_root.sh -fn_check_systemdir +check_systemdir.sh check_ip.sh check_logs.sh if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then diff --git a/functions/command_stop.sh b/functions/command_stop.sh index a0b72ec23..45a70074e 100644 --- a/functions/command_stop.sh +++ b/functions/command_stop.sh @@ -30,7 +30,7 @@ sdtd_telnet(){ command_stop.sh_teamspeak3(){ check_root.sh -fn_check_systemdir +check_systemdir.sh fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 @@ -51,7 +51,7 @@ echo -en "\n" command_stop.sh_tmux(){ check_root.sh -fn_check_systemdir +check_systemdir.sh info_config.sh fn_printdots "${servername}" fn_scriptlog "${servername}" diff --git a/functions/command_validate.sh b/functions/command_validate.sh index 221d6e401..66419eb2f 100644 --- a/functions/command_validate.sh +++ b/functions/command_validate.sh @@ -43,7 +43,7 @@ fn_scriptlog "Checking complete" } fn_check_root -fn_check_systemdir +check_systemdir.sh tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then command_stop.sh diff --git a/functions/dev_detect_deps.sh b/functions/dev_detect_deps.sh index bd17b97b8..7066aea81 100644 --- a/functions/dev_detect_deps.sh +++ b/functions/dev_detect_deps.sh @@ -8,7 +8,7 @@ lgsm_version="201215" local modulename="Backup" check_root.sh -fn_check_systemdir +check_systemdir.sh cd "${executabledir}" if [ "${executable}" == "./hlds_run" ]; then executable=hlds_linux diff --git a/functions/email_test.sh b/functions/email_test.sh index f067a6c65..524857864 100644 --- a/functions/email_test.sh +++ b/functions/email_test.sh @@ -8,7 +8,7 @@ lgsm_version="061115" local modulename="Email" check_root.sh -fn_check_systemdir +check_systemdir.sh info_config.sh if [ "${emailnotification}" = "on" ]; then fn_scriptlog "Sending test notification" diff --git a/functions/update_dl.sh b/functions/update_dl.sh index cacd4f1ef..18c62f144 100644 --- a/functions/update_dl.sh +++ b/functions/update_dl.sh @@ -10,7 +10,7 @@ local modulename="Update" fn_steamcmd_dl(){ check_root.sh -fn_check_systemdir +check_systemdir.sh info_config.sh fn_printdots "Updating ${servername}" sleep 1 @@ -40,7 +40,7 @@ fi fn_teamspeak3_dl(){ check_root.sh -fn_check_systemdir +check_systemdir.sh info_config.sh fn_printdots "Updating ${servername}" sleep 1 From 1839121ad528c53f597f3a8484c2da4d548efde4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 09:46:08 +0000 Subject: [PATCH 09/45] info_glibc.sh --- functions/command_details.sh | 2 +- functions/core_functions.sh | 2 +- functions/info_glibc.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/command_details.sh b/functions/command_details.sh index 81242bca6..aef1f25a7 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -701,7 +701,7 @@ if [ ! -e "${servercfgfullpath}" ]; then echo -en " \r" fi -command_details.sh_glibc +info_glibc.sh if [ "${engine}" == "avalanche" ]; then command_details.sh_avalanche diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 408d1cf10..10dcdff5a 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -102,7 +102,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -command_details.sh_glibc(){ +info_glibc.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/info_glibc.sh b/functions/info_glibc.sh index 5a7fb65ad..c01c282c4 100644 --- a/functions/info_glibc.sh +++ b/functions/info_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_details.sh_glibc function +# LGSM info_glibc.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" From 7f79b23f16b77906e34fbce40b7772eef78924ac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 09:47:15 +0000 Subject: [PATCH 10/45] check_root.sh --- functions/command_validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/command_validate.sh b/functions/command_validate.sh index 66419eb2f..7a38488a3 100644 --- a/functions/command_validate.sh +++ b/functions/command_validate.sh @@ -42,7 +42,7 @@ fi fn_scriptlog "Checking complete" } -fn_check_root +check_root.sh check_systemdir.sh tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") if [ "${tmuxwc}" -eq 1 ]; then From b9bc3b396109ba4aa6f047dbe849d93ca3acbfa9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 17:52:09 +0000 Subject: [PATCH 11/45] redirect function Any old scripts can be redirected to the new renamed functions --- functions/fn_functions | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 functions/fn_functions diff --git a/functions/fn_functions b/functions/fn_functions new file mode 100644 index 000000000..81fa41650 --- /dev/null +++ b/functions/fn_functions @@ -0,0 +1,15 @@ +#!/bin/bash +# LGSM fn_functions function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="201215" + +# Description: Redirect to new core_functions.sh + +fn_functions(){ +# Functions are defined in fn_functions. +functionfile="${FUNCNAME}" +fn_runfunction +} + +core_functions.sh \ No newline at end of file From 8c996cd3fea64b1f00e1d483ac73f8573de2e5f1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 17:54:20 +0000 Subject: [PATCH 12/45] fixed bug --- functions/fn_functions | 2 +- functions/{install_ts3 => install_ts3.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename functions/{install_ts3 => install_ts3.sh} (100%) diff --git a/functions/fn_functions b/functions/fn_functions index 81fa41650..091cce711 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -6,7 +6,7 @@ lgsm_version="201215" # Description: Redirect to new core_functions.sh -fn_functions(){ +core_functions.sh(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction diff --git a/functions/install_ts3 b/functions/install_ts3.sh similarity index 100% rename from functions/install_ts3 rename to functions/install_ts3.sh From e34d5eb715abe36e4bab548915656783e6ec4314 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 17:56:02 +0000 Subject: [PATCH 13/45] getopt redirect for old scripts --- functions/fn_functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/fn_functions b/functions/fn_functions index 091cce711..6f5048d27 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -1,15 +1,15 @@ #!/bin/bash -# LGSM fn_functions function +# LGSM fn_getopt function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" -# Description: Redirect to new core_functions.sh +# Description: Redirect to new core_getopt.sh -core_functions.sh(){ +core_getopt.sh(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction } -core_functions.sh \ No newline at end of file +core_getopt.sh \ No newline at end of file From 248975080218fba88e3319b638295aaac3a6dd80 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:12:18 +0000 Subject: [PATCH 14/45] updated date --- functions/core_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 10dcdff5a..1773c775f 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -2,7 +2,7 @@ # LGSM fn_functions function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="261215" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. From 8a1b3760c26d531b8fb20075d052f533dbab5c4f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:15:15 +0000 Subject: [PATCH 15/45] corrected redirect --- functions/fn_functions | 4 ++-- functions/fn_getopt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 functions/fn_getopt diff --git a/functions/fn_functions b/functions/fn_functions index 6f5048d27..3036277ec 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -6,10 +6,10 @@ lgsm_version="201215" # Description: Redirect to new core_getopt.sh -core_getopt.sh(){ +fn_functions.sh(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction } -core_getopt.sh \ No newline at end of file +core_functions.sh \ No newline at end of file diff --git a/functions/fn_getopt b/functions/fn_getopt new file mode 100644 index 000000000..40c7a2337 --- /dev/null +++ b/functions/fn_getopt @@ -0,0 +1,15 @@ +#!/bin/bash +# LGSM fn_getopt function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="201215" + +# Description: Redirect to new core_getopt.sh + +fn_functions(){ +# Functions are defined in fn_functions. +functionfile="${FUNCNAME}" +fn_runfunction +} + +core_functions.sh \ No newline at end of file From 84968aa97d4b85d060608c04ce2d5c70aaedcf85 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:16:54 +0000 Subject: [PATCH 16/45] corrected again --- functions/fn_functions | 6 +++--- functions/fn_getopt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/fn_functions b/functions/fn_functions index 3036277ec..091cce711 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -1,12 +1,12 @@ #!/bin/bash -# LGSM fn_getopt function +# LGSM fn_functions function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" -# Description: Redirect to new core_getopt.sh +# Description: Redirect to new core_functions.sh -fn_functions.sh(){ +core_functions.sh(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction diff --git a/functions/fn_getopt b/functions/fn_getopt index 40c7a2337..6f5048d27 100644 --- a/functions/fn_getopt +++ b/functions/fn_getopt @@ -6,10 +6,10 @@ lgsm_version="201215" # Description: Redirect to new core_getopt.sh -fn_functions(){ +core_getopt.sh(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction } -core_functions.sh \ No newline at end of file +core_getopt.sh \ No newline at end of file From 769b15324aba5c12917570baf160c3a0e507a034 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:20:12 +0000 Subject: [PATCH 17/45] define fn_getopt --- functions/fn_functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/fn_functions b/functions/fn_functions index 091cce711..785a53900 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -12,4 +12,9 @@ functionfile="${FUNCNAME}" fn_runfunction } +fn_getopt(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + core_functions.sh \ No newline at end of file From 4172ceba58c4e43866566a71e1d84b37165b3d37 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:26:52 +0000 Subject: [PATCH 18/45] changed back to -d --- functions/check_systemdir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/check_systemdir.sh b/functions/check_systemdir.sh index 896ae5bf4..9f21ca29c 100644 --- a/functions/check_systemdir.sh +++ b/functions/check_systemdir.sh @@ -2,9 +2,9 @@ # LGSM check_systemdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="161215" -if [ ! -f "${systemdir}" ]; then +if [ ! -d "${systemdir}" ]; then fn_printfailnl "Cannot access ${systemdir}: No such directory" exit 1 fi From a063b44313e79e85dcff1f7eb11b15513f8285a3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:33:08 +0000 Subject: [PATCH 19/45] updated core_install.sh --- functions/core_functions.sh | 6 +++--- functions/core_getopt.sh | 12 ++++++------ functions/install_retry.sh | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 1773c775f..07c9a636c 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_functions function +# LGSM core_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="261215" @@ -206,10 +206,10 @@ fn_runfunction fn_autoinstall(){ autoinstall=1 -fn_install +command_install.sh( } -fn_install(){ +command_install.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index 454871c5b..6574a34a1 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -38,7 +38,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; ai|auto-install) fn_autoinstall;; dd|depsdetect) @@ -93,7 +93,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; ai|auto-install) fn_autoinstall;; dd|depsdetect) @@ -198,7 +198,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; ai|auto-install) fn_autoinstall;; dd|depsdetect) @@ -258,7 +258,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; mc|map-compressor) compress_ut99_maps.sh;; dd|depsdetect) @@ -320,7 +320,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; ai|auto-install) fn_autoinstall;; dd|depsdetect) @@ -381,7 +381,7 @@ case "$getopt" in dev|dev-debug) dev_debug.sh;; i|install) - fn_install;; + command_install.sh;; mc|map-compressor) compress_ut99_maps.sh;; dd|depsdetect) diff --git a/functions/install_retry.sh b/functions/install_retry.sh index 8405f7393..ec5adde2d 100644 --- a/functions/install_retry.sh +++ b/functions/install_retry.sh @@ -7,7 +7,7 @@ lgsm_version="061115" while true; do read -e -i "y" -p "Retry install? [Y/n]" yn case $yn in - [Yy]* ) fn_install; exit;; + [Yy]* ) command_install.sh; exit;; [Nn]* ) echo Exiting; exit;; * ) echo "Please answer yes or no.";; esac From a9b194a30dbf06a0b88150f83ebb559f599d8700 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:34:01 +0000 Subject: [PATCH 20/45] stray ( --- functions/core_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 07c9a636c..cfdaa9eae 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -206,7 +206,7 @@ fn_runfunction fn_autoinstall(){ autoinstall=1 -command_install.sh( +command_install.sh } command_install.sh(){ From c40588bc1e76e9324c3d248082e7200fbff19f1d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:35:51 +0000 Subject: [PATCH 21/45] updated install_steamcmd.sh --- functions/command_install.sh | 2 +- functions/install_steamcmd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/command_install.sh b/functions/command_install.sh index db77c9d87..856e97599 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -19,7 +19,7 @@ elif [ "${gamename}" == "Unreal Tournament 99" ]; then elif [ "${gamename}" == "Teamspeak 3" ]; then install_ts3.sh elif [ ! -z "${appid}" ]; then - fn_install_steamcmd + install_steamcmd.sh finstall_serverfiles.sh install_steamfix.sh fi diff --git a/functions/install_steamcmd.sh b/functions/install_steamcmd.sh index f9edcc389..6d075b537 100644 --- a/functions/install_steamcmd.sh +++ b/functions/install_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_install_steamcmd function +# LGSM install_steamcmd.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" From 75fcbb9d53d7e02353db1a93ed603849fbe14308 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:36:17 +0000 Subject: [PATCH 22/45] stray character --- functions/command_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/command_install.sh b/functions/command_install.sh index 856e97599..5a3a15825 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -20,7 +20,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then install_ts3.sh elif [ ! -z "${appid}" ]; then install_steamcmd.sh - finstall_serverfiles.sh + install_serverfiles.sh install_steamfix.sh fi From d6d44e9d854a6d2a8f0d8c1ee2a320283c4edf80 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:37:42 +0000 Subject: [PATCH 23/45] corrected install_fix_steam.sh --- functions/command_install.sh | 2 +- functions/core_functions.sh | 2 +- functions/install_fix_steam.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/command_install.sh b/functions/command_install.sh index 5a3a15825..364664dbb 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -21,7 +21,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then elif [ ! -z "${appid}" ]; then install_steamcmd.sh install_serverfiles.sh - install_steamfix.sh + install_fix_steam.sh fi # Configuration diff --git a/functions/core_functions.sh b/functions/core_functions.sh index cfdaa9eae..406fb7417 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -278,7 +278,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -install_steamfix.sh(){ +install_fix_steam.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/install_fix_steam.sh b/functions/install_fix_steam.sh index 8d5906375..d28670058 100644 --- a/functions/install_fix_steam.sh +++ b/functions/install_fix_steam.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_steamfix.sh function +# LGSM install_fix_steam.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" From ca7665cee7e9e6fe4779e671793f69e2136616a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 20:49:50 +0000 Subject: [PATCH 24/45] updated command_backup.sh --- functions/command_backup.sh | 2 +- functions/core_getopt.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/functions/command_backup.sh b/functions/command_backup.sh index 60e6b3466..871da4349 100644 --- a/functions/command_backup.sh +++ b/functions/command_backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_backup function +# LGSM command_backup.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index 6574a34a1..dfbf43907 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -30,7 +30,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; c|console) command_console.sh;; d|debug) @@ -89,7 +89,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; dev|dev-debug) dev_debug.sh;; i|install) @@ -136,7 +136,7 @@ case "$getopt" in et|email-test) email_test.sh;; b|backup) - fn_backup;; + command_backup.sh;; dev|dev-debug) dev_debug.sh;; console) @@ -190,7 +190,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; c|console) command_console.sh;; d|debug) @@ -250,7 +250,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; c|console) command_console.sh;; d|debug) @@ -312,7 +312,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; c|console) command_console.sh;; d|debug) @@ -373,7 +373,7 @@ case "$getopt" in d|details) command_details.sh;; b|backup) - fn_backup;; + command_backup.sh;; c|console) command_console.sh;; d|debug) From 5de677a43a94e223807f39a80309c78239a59493 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 21:37:47 +0000 Subject: [PATCH 25/45] fixed core_functions.sh --- functions/fn_functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/fn_functions b/functions/fn_functions index a16b83311..8b3884f25 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -16,3 +16,5 @@ fn_getopt(){ functionfile="${FUNCNAME}" fn_runfunction } + +core_functions.sh \ No newline at end of file From b6d94429d5b1f515821c2e2d7c1ae436eeff5002 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 26 Dec 2015 21:41:17 +0000 Subject: [PATCH 26/45] see pull request https://github.com/dgibbs64/linuxgsm/pull/582/ --- functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index eb77f2cf7..13de497e5 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -45,7 +45,7 @@ else if [ "${emailnotification}" = "on" ]; then subject="${servicename} Monitor - Restarting ${servername}" actiontaken="restarted ${servername}" - email.shnotification + email.sh fi fi sleep 0.5 From 069f2cba06366201063d8465e00b19ec07b8718a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 19:32:23 +0000 Subject: [PATCH 27/45] updated dates --- functions/check.sh | 2 +- functions/check_ip.sh | 2 +- functions/check_logs.sh | 2 +- functions/check_root.sh | 2 +- functions/check_steamcmd.sh | 2 +- functions/check_steamuser.sh | 2 +- functions/check_systemdir.sh | 2 +- functions/check_tmux.sh | 2 +- functions/command_backup.sh | 2 +- functions/command_console.sh | 2 +- functions/command_debug.sh | 2 +- functions/command_install.sh | 2 +- functions/command_monitor.sh | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index 6cbe69b91..3a2589bda 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -2,7 +2,7 @@ # LGSM fn_check function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="261215" # Description: Overall function for managing checks. # Runs checks that will either halt on or fix an issue. diff --git a/functions/check_ip.sh b/functions/check_ip.sh index e3e151d08..8ae3767ea 100644 --- a/functions/check_ip.sh +++ b/functions/check_ip.sh @@ -2,7 +2,7 @@ # LGSM check_ip.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="261215" # Description: Automatically identifies the server interface IP. # If multiple interfaces are detected the user will need to manualy set using ip="0.0.0.0". diff --git a/functions/check_logs.sh b/functions/check_logs.sh index 453e04f76..7adbbbe03 100644 --- a/functions/check_logs.sh +++ b/functions/check_logs.sh @@ -2,7 +2,7 @@ # LGSM check_logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Description: Checks that log files exist on server start diff --git a/functions/check_root.sh b/functions/check_root.sh index 3275d2261..126814f4a 100644 --- a/functions/check_root.sh +++ b/functions/check_root.sh @@ -2,7 +2,7 @@ # LGSM check_root.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" if [ $(whoami) = "root" ]; then fn_printfailnl "Do NOT run this script as root!" diff --git a/functions/check_steamcmd.sh b/functions/check_steamcmd.sh index c5926103e..f765db04f 100644 --- a/functions/check_steamcmd.sh +++ b/functions/check_steamcmd.sh @@ -2,7 +2,7 @@ # LGSM check_steamcmd.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD diff --git a/functions/check_steamuser.sh b/functions/check_steamuser.sh index 39f3b2cfd..b0ada26e2 100644 --- a/functions/check_steamuser.sh +++ b/functions/check_steamuser.sh @@ -2,7 +2,7 @@ # LGSM check_steamuser.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" if [ "${steamuser}" == "username" ]; then fn_printfailnl "Steam login not set. Update steamuser." diff --git a/functions/check_systemdir.sh b/functions/check_systemdir.sh index 9f21ca29c..63dac0022 100644 --- a/functions/check_systemdir.sh +++ b/functions/check_systemdir.sh @@ -2,7 +2,7 @@ # LGSM check_systemdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="161215" +lgsm_version="261215" if [ ! -d "${systemdir}" ]; then fn_printfailnl "Cannot access ${systemdir}: No such directory" diff --git a/functions/check_tmux.sh b/functions/check_tmux.sh index b37fe7421..72ca41535 100644 --- a/functions/check_tmux.sh +++ b/functions/check_tmux.sh @@ -2,7 +2,7 @@ # LGSM check_tmux.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Checks if tmux is installed as too many users do not RTFM or know how to use Google. diff --git a/functions/command_backup.sh b/functions/command_backup.sh index 871da4349..851876cc4 100644 --- a/functions/command_backup.sh +++ b/functions/command_backup.sh @@ -2,7 +2,7 @@ # LGSM command_backup.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="261215" # Description: Creates a .tar.gz file in the backup directory. diff --git a/functions/command_console.sh b/functions/command_console.sh index 490612b9c..e9eeb0896 100644 --- a/functions/command_console.sh +++ b/functions/command_console.sh @@ -2,7 +2,7 @@ # LGSM command_console.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Description: Gives access to the server tmux console. diff --git a/functions/command_debug.sh b/functions/command_debug.sh index 9404b0c09..eb371c966 100644 --- a/functions/command_debug.sh +++ b/functions/command_debug.sh @@ -2,7 +2,7 @@ # LGSM command_debug.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Description: Runs the server without tmux. Runs direct from the terminal. diff --git a/functions/command_install.sh b/functions/command_install.sh index 4c8471232..29bcdd926 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -33,7 +33,7 @@ if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then install_gslt.sh fix_csgo.sh elif [ "${gamename}" == "Teamspeak 3" ]; then - fn_install_ts3db + install_ts3db.sh elif [ "${gamename}" == "Team Fortress 2" ]; then install_gslt.sh elif [ "${gamename}" == "Killing Floor" ]; then diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index 13de497e5..dc6a034b1 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -2,7 +2,7 @@ # LGSM command_monitor.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="261215" # Description: Monitors server by checking for running proccesses # then passes to monitor_gsquery.sh. From 723b0b1f845e657c7b2d5e3bc75f2363e441d706 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 19:32:48 +0000 Subject: [PATCH 28/45] altered tests to download branch thats being tested --- tests/tests_jc2server.sh | 63 +++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 3749027e0..aa970f7f3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -25,6 +25,13 @@ parms="" #### Advanced Variables #### +# Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="dgibbs64" +githubrepo="linuxgsm" +githubbranch="$TRAVIS_BRANCH" + # Steam appid="261140" @@ -63,20 +70,47 @@ consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M- ##### Script ##### # Do not edit -fn_runfunction(){ -# Functions are downloaded and run with this function -if [ ! -f "${rootdir}/functions/${functionfile}" ]; then - cd "${rootdir}" - if [ ! -d "functions" ]; then - mkdir functions +fn_getgithubfile(){ +filename=$1 +exec=$2 +fileurl=${3:-$filename} +filepath="${rootdir}/${filename}" +filedir=$(dirname "${filepath}") +# If the function file is missing, then download +if [ ! -f "${filepath}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir "${filedir}" + fi + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}" + echo -e " fetching ${filename}...\c" + if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then + : + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit fi - cd functions - echo -e " loading ${functionfile}...\c" - wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- - chmod +x "${functionfile}" - cd "${rootdir}" + curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curl}" + echo -e "${githuburl}\n" + exit + else + echo -e "\e[0;32mOK\e[0m" + fi + if [ "${exec}" ]; then + chmod +x "${filepath}" + fi +fi +if [ "${exec}" ]; then + source "${filepath}" fi -source "${rootdir}/functions/${functionfile}" +} + +fn_runfunction(){ + fn_getgithubfile "functions/${functionfile}" 1 } fn_functions(){ @@ -85,7 +119,10 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh + +getopt=$1 +core_getopt.sh fn_currentstatus_tmux(){ pid=$(tmux list-sessions 2>&1 | awk '{print $1}' | grep -Ec "^${servicename}:") From 29f8e95da6c2a51a75add0c08a31222a17497f60 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 19:35:02 +0000 Subject: [PATCH 29/45] corrected function name --- tests/tests_jc2server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index aa970f7f3..4a825edc3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -113,8 +113,8 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } From e054f559ab74629ec5a5179849b71d140ec54c26 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 19:56:17 +0000 Subject: [PATCH 30/45] Made corrections Testing again --- tests/tests_jc2server.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 4a825edc3..b647fa85d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://gameservermanagers.com -version="071115" +version="271215" #### Variables #### @@ -121,9 +121,6 @@ fn_runfunction core_functions.sh -getopt=$1 -core_getopt.sh - fn_currentstatus_tmux(){ pid=$(tmux list-sessions 2>&1 | awk '{print $1}' | grep -Ec "^${servicename}:") if [ "${pid}" != "0" ]; then @@ -207,7 +204,7 @@ echo "=================================" echo "Description:" echo "displaying options messages." echo "" -(fn_getopt) +(core_getopt.sh) echo "" echo "Test complete!" sleep 1 @@ -484,3 +481,4 @@ fn_printinfo "Tidying up directories." sleep 1 rm -rfv ${serverfiles} echo "END" + From edcc60cda6148239822cef2f33ab79abb68bcdbe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 19:59:24 +0000 Subject: [PATCH 31/45] Displays which branch functions are being pulled --- tests/tests_jc2server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index b647fa85d..d72fafdc2 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -182,6 +182,7 @@ sleep 1 echo "=================================" echo "Server Tests" echo "Using: ${gamename}" +echo "Testing Branch $TRAVIS_BRANCH" echo "=================================" echo "" sleep 1 From fd98fc68ad1a8c3321f059cb35e3c15e538927ed Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:00:36 +0000 Subject: [PATCH 32/45] grammar --- tests/tests_jc2server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index d72fafdc2..09b8383f7 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -182,7 +182,7 @@ sleep 1 echo "=================================" echo "Server Tests" echo "Using: ${gamename}" -echo "Testing Branch $TRAVIS_BRANCH" +echo "Testing Branch: $TRAVIS_BRANCH" echo "=================================" echo "" sleep 1 From d3efed7da9a7fa5587e17162a5f74e9d9b7f5e28 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:07:30 +0000 Subject: [PATCH 33/45] updated functions and getopt names --- 7DaysToDie/sdtdserver | 8 +++---- ARKSurvivalEvolved/arkserver | 8 +++---- Arma3/arma3server | 8 +++---- BlackMesa/bmdmserver | 8 +++---- BladeSymphony/bsserver | 8 +++---- CounterStrike/csserver | 8 +++---- CounterStrikeConditionZero/csczserver | 8 +++---- CounterStrikeGlobalOffensive/csgoserver | 4 ++-- CounterStrikeSource/cssserver | 8 +++---- DayOfDefeat/dodserver | 8 +++---- DayOfDefeatSource/dodsserver | 8 +++---- DeathmatchClassic/dmcserver | 8 +++---- DontStarveTogether/dstserver | 8 +++---- DoubleActionBoogaloo/dabserver | 8 +++---- FistfulOfFrags/fofserver | 8 +++---- GarrysMod/gmodserver | 8 +++---- HalfLife2Deathmatch/hl2dmserver | 8 +++---- HalfLifeDeathmatch/hldmserver | 8 +++---- HalfLifeDeathmatchSource/hldmsserver | 8 +++---- Hurtworld/hwserver | 8 +++---- Insurgency/insserver | 8 +++---- JustCause2/jc2server | 8 +++---- KillingFloor/kfserver | 8 +++---- Left4Dead/l4dserver | 8 +++---- Left4Dead2/l4d2server | 8 +++---- Mumble/mumbleserver | 8 +++---- NS2Combat/ns2cserver | 8 +++---- NaturalSelection2/ns2server | 8 +++---- NoMoreRoomInHell/nmrihserver | 8 +++---- OpposingForce/opforserver | 8 +++---- PiratesVikingandKnightsII/pvkiiserver | 8 +++---- ProjectZomboid/pzserver | 8 +++---- RedOrchestra/roserver | 8 +++---- Ricochet/ricochetserver | 8 +++---- SeriousSam3BFE/ss3sserver | 8 +++---- StarBound/sbserver | 8 +++---- TeamFortress2/tf2server | 8 +++---- TeamFortressClassic/tfcserver | 8 +++---- TeamSpeak3/ts3server | 8 +++---- Teeworlds/twserver | 8 +++---- Terraria/terrariaserver | 8 +++---- UnrealTournament2004/ut2k4server | 8 +++---- UnrealTournament99/ut99server | 8 +++---- functions/core_getopt.sh | 28 ++++++++++++------------- functions/fn_functions | 6 +++--- functions/fn_getopt | 4 ++-- tests/tests_ts3server.sh | 8 +++---- 47 files changed, 193 insertions(+), 193 deletions(-) diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 44848ee9c..dd3995d57 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -122,14 +122,14 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index 3cd841131..a707857cb 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -120,13 +120,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Arma3/arma3server b/Arma3/arma3server index 5548a128c..27ee5011b 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -143,13 +143,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 74825317a..d5eac8203 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index a0a65b8e6..c83e838e6 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 83dcc0b47..6ac83d9d5 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index 0c700f370..5ca968fd3 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 1af1b727f..3634d3f99 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -149,8 +149,8 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 9bd6001e3..6912e1fa1 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index b73a99c6e..af7f5e635 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 03788b07c..225fb6f0e 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index 863296f07..b24fd7728 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 029735e52..29880dc2a 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -120,13 +120,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index b6bc46ac2..313fe18f5 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 42b16cd55..2b3360b93 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 455671cab..8826e1f8c 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -137,13 +137,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index 530cdfbff..413be3164 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index bf3e13dba..b24f484ef 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -125,13 +125,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 0b6473e71..183cfa82b 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index e74f5648a..8c117c1bb 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -139,14 +139,14 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Insurgency/insserver b/Insurgency/insserver index 85f9fafa9..f377426ac 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/JustCause2/jc2server b/JustCause2/jc2server index a60af82cd..983a9b728 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -119,13 +119,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index e24d6e2be..841f4b1be 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -128,13 +128,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index c11d7f5f7..7a12f3912 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 238e958a5..10ca2ef2b 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -125,13 +125,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index 10c284dab..987b0420f 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -105,14 +105,14 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index df2e5644f..150be9232 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -131,13 +131,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 3e8654da0..0366d6ef0 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -131,13 +131,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 8081dcee4..7596a503b 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 7cffd927f..5c31ee4cd 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index d589170f7..56538d0ee 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index c1c1c884d..dae5edcc7 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -120,13 +120,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 83696e4ed..e0aae68ae 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -124,13 +124,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 1da3738b9..95d6be392 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index 27fed4bd2..0ffefc5e8 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -123,13 +123,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/StarBound/sbserver b/StarBound/sbserver index 770570fa2..5fc099ea5 100644 --- a/StarBound/sbserver +++ b/StarBound/sbserver @@ -119,13 +119,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index a1c407e6b..57b2cd56a 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -131,13 +131,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index dc172a425..78e0ed290 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -126,13 +126,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 5262b41f8..311474c30 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -103,13 +103,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 8414ae06c..9e8abff48 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -122,13 +122,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index e2da26348..12aad8b54 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -121,13 +121,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index d8b7a1512..177fc84eb 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -114,13 +114,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index c89ce2406..a1dd53887 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -113,13 +113,13 @@ fn_runfunction(){ fn_getgithubfile "functions/${functionfile}" 1 } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh getopt=$1 -fn_getopt +core_getopt.sh diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index dfbf43907..d56946183 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -1,12 +1,12 @@ #!/bin/bash -# LGSM fn_getopt function +# LGSM core_getopt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="061115" # Description: getopt arguments. -fn_getopt_generic(){ +core_getopt.sh_generic(){ case "$getopt" in st|start) command_start.sh;; @@ -70,7 +70,7 @@ case "$getopt" in exit } -fn_getopt_teamspeak3(){ +core_getopt.sh_teamspeak3(){ case "$getopt" in st|start) command_start.sh;; @@ -121,7 +121,7 @@ case "$getopt" in exit } -fn_getopt_mumble(){ +core_getopt.sh_mumble(){ case "$getopt" in st|start) command_start.sh;; @@ -166,7 +166,7 @@ case "$getopt" in exit } -fn_getopt_gmodserver(){ +core_getopt.sh_gmodserver(){ case "$getopt" in st|start) command_start.sh;; @@ -233,7 +233,7 @@ case "$getopt" in exit } -fn_getopt_unreal(){ +core_getopt.sh_unreal(){ case "$getopt" in st|start) command_start.sh;; @@ -288,7 +288,7 @@ exit } -fn_getopt_unreal2(){ +core_getopt.sh_unreal2(){ case "$getopt" in st|start) command_start.sh;; @@ -356,7 +356,7 @@ exit } -fn_getopt_ut2k4(){ +core_getopt.sh_ut2k4(){ case "$getopt" in st|start) command_start.sh;; @@ -411,17 +411,17 @@ exit } if [ "${gamename}" == "Mumble" ]; then - fn_getopt_mumble + core_getopt.sh_mumble elif [ "${gamename}" == "Teamspeak 3" ]; then - fn_getopt_teamspeak3 + core_getopt.sh_teamspeak3 elif [ "${engine}" == "unreal2" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then - fn_getopt_ut2k4 + core_getopt.sh_ut2k4 else - fn_getopt_unreal2 + core_getopt.sh_unreal2 fi elif [ "${engine}" == "unreal" ]; then - fn_getopt_unreal + core_getopt.sh_unreal else - fn_getopt_generic + core_getopt.sh_generic fi \ No newline at end of file diff --git a/functions/fn_functions b/functions/fn_functions index 8b3884f25..2df618f10 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_functions function +# LGSM core_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="261215" @@ -7,12 +7,12 @@ lgsm_version="261215" # Description: Redirect to new core_functions.sh core_functions.sh(){ -# Functions are defined in fn_functions. +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_getopt(){ +core_getopt.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/fn_getopt b/functions/fn_getopt index 6f5048d27..5d5e2a25f 100644 --- a/functions/fn_getopt +++ b/functions/fn_getopt @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_getopt function +# LGSM core_getopt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="201215" @@ -7,7 +7,7 @@ lgsm_version="201215" # Description: Redirect to new core_getopt.sh core_getopt.sh(){ -# Functions are defined in fn_functions. +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 3d6ec7398..7347e8883 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -62,13 +62,13 @@ fi source "${rootdir}/functions/${functionfile}" } -fn_functions(){ -# Functions are defined in fn_functions. +core_functions.sh(){ +# Functions are defined in core_functions.sh. functionfile="${FUNCNAME}" fn_runfunction } -fn_functions +core_functions.sh fn_currentstatus_tmux(){ pid=$(tmux list-sessions 2>&1 | awk '{print $1}' | grep -Ec "^${servicename}:") @@ -152,7 +152,7 @@ echo "=================================" echo "Description:" echo "displaying options messages." echo "" -(fn_getopt) +(core_getopt.sh) echo "" echo "Test complete!" sleep 1 From 5f290fd3b898ca3eb036e2652f0226ae96d343ee Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:13:03 +0000 Subject: [PATCH 34/45] Updates all version numbers --- 7DaysToDie/sdtdserver | 2 +- ARKSurvivalEvolved/arkserver | 2 +- Arma3/arma3server | 2 +- BlackMesa/bmdmserver | 2 +- BladeSymphony/bsserver | 2 +- CounterStrike/csserver | 2 +- CounterStrikeConditionZero/csczserver | 2 +- CounterStrikeGlobalOffensive/csgoserver | 2 +- CounterStrikeSource/cssserver | 2 +- DayOfDefeat/dodserver | 2 +- DayOfDefeatSource/dodsserver | 2 +- DeathmatchClassic/dmcserver | 2 +- DontStarveTogether/dstserver | 2 +- DoubleActionBoogaloo/dabserver | 2 +- FistfulOfFrags/fofserver | 2 +- GarrysMod/gmodserver | 2 +- HalfLife2Deathmatch/hl2dmserver | 2 +- HalfLifeDeathmatch/hldmserver | 2 +- HalfLifeDeathmatchSource/hldmsserver | 2 +- Insurgency/insserver | 2 +- JustCause2/jc2server | 2 +- KillingFloor/kfserver | 2 +- Left4Dead/l4dserver | 2 +- Left4Dead2/l4d2server | 2 +- Mumble/mumbleserver | 2 +- NS2Combat/ns2cserver | 2 +- NaturalSelection2/ns2server | 2 +- NoMoreRoomInHell/nmrihserver | 2 +- OpposingForce/opforserver | 2 +- PiratesVikingandKnightsII/pvkiiserver | 2 +- ProjectZomboid/pzserver | 2 +- RedOrchestra/roserver | 2 +- Ricochet/ricochetserver | 2 +- StarBound/sbserver | 2 +- TeamFortress2/tf2server | 2 +- TeamFortressClassic/tfcserver | 2 +- Teeworlds/twserver | 2 +- Terraria/terrariaserver | 2 +- UnrealTournament2004/ut2k4server | 2 +- functions/check.sh | 2 +- functions/check_ip.sh | 2 +- functions/check_logs.sh | 2 +- functions/check_root.sh | 2 +- functions/check_steamcmd.sh | 2 +- functions/check_steamuser.sh | 2 +- functions/check_systemdir.sh | 2 +- functions/check_tmux.sh | 2 +- functions/command_backup.sh | 2 +- functions/command_console.sh | 2 +- functions/command_debug.sh | 2 +- functions/command_details.sh | 2 +- functions/command_install.sh | 2 +- functions/command_monitor.sh | 2 +- functions/command_start.sh | 2 +- functions/command_stop.sh | 2 +- functions/command_validate.sh | 2 +- functions/compress_unreal2_maps.sh | 2 +- functions/compress_ut99_maps.sh | 2 +- functions/core_functions.sh | 2 +- functions/core_getopt.sh | 2 +- functions/core_messages.sh | 2 +- functions/dev_debug.sh | 2 +- functions/dev_detect_deps.sh | 2 +- functions/email.sh | 2 +- functions/email_test.sh | 2 +- functions/fix_arma3.sh | 2 +- functions/fix_csgo.sh | 2 +- functions/fix_glibc.sh | 2 +- functions/fix_ins.sh | 2 +- functions/fn_functions | 2 +- functions/fn_getopt | 2 +- functions/info_config.sh | 2 +- functions/info_distro.sh | 2 +- functions/info_glibc.sh | 2 +- functions/info_ts3status.sh | 2 +- functions/install_complete.sh | 2 +- functions/install_config.sh | 2 +- functions/install_dl_ut2k4.sh | 2 +- functions/install_dl_ut99.sh | 2 +- functions/install_fix_kf.sh | 2 +- functions/install_fix_ro.sh | 2 +- functions/install_fix_steam.sh | 2 +- functions/install_fix_ut2k4.sh | 2 +- functions/install_fix_ut99.sh | 2 +- functions/install_gslt.sh | 2 +- functions/install_gsquery.sh | 2 +- functions/install_header.sh | 2 +- functions/install_logs.sh | 2 +- functions/install_retry.sh | 2 +- functions/install_serverdir.sh | 2 +- functions/install_serverfiles.sh | 2 +- functions/install_steamcmd.sh | 2 +- functions/install_ts3.sh | 2 +- functions/install_ts3db.sh | 2 +- functions/install_ut2k4.sh | 2 +- functions/install_ut2k4_key.sh | 2 +- functions/install_ut99.sh | 2 +- functions/logs.sh | 2 +- functions/monitor_gsquery.sh | 2 +- functions/update_check.sh | 2 +- functions/update_dl.sh | 2 +- functions/update_functions.sh | 2 +- 102 files changed, 102 insertions(+), 102 deletions(-) diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index dd3995d57..b3112820c 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index a707857cb..2304ef566 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Arma3/arma3server b/Arma3/arma3server index 27ee5011b..ff296e3bc 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index d5eac8203..7601f826a 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index c83e838e6..87f1ff2ee 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 6ac83d9d5..4fa7104d8 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index 5ca968fd3..a6eca599c 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 3634d3f99..9681d7e56 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 6912e1fa1..3efde2766 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index af7f5e635..88ea3b92a 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 225fb6f0e..5d80d01b0 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index b24fd7728..0b9efa02a 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 29880dc2a..8ecf55c88 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index 313fe18f5..00b8c70f6 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 2b3360b93..eaa85694f 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 8826e1f8c..363eb01c8 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index 413be3164..271a024ef 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index b24f484ef..b74914da1 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 183cfa82b..33b2d0723 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Insurgency/insserver b/Insurgency/insserver index f377426ac..ff37e41f8 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 983a9b728..5435a3121 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 841f4b1be..2aa5af27b 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 7a12f3912..519ab1379 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 10ca2ef2b..6c966cb6e 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index 987b0420f..c0bfa4692 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index 150be9232..a5683bf81 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 0366d6ef0..d53651b7f 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 7596a503b..26c836f2d 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 5c31ee4cd..61e9b4128 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index 56538d0ee..5a4588753 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index dae5edcc7..701827e96 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index e0aae68ae..4e6424814 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 95d6be392..555c1b39b 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/StarBound/sbserver b/StarBound/sbserver index 5fc099ea5..c8253a643 100644 --- a/StarBound/sbserver +++ b/StarBound/sbserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 57b2cd56a..984817ab0 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 78e0ed290..d1ee8b4c3 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 9e8abff48..a051ebe9e 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 12aad8b54..f8088bd16 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index 177fc84eb..d74310b30 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="201215" +version="271215" #### Variables #### diff --git a/functions/check.sh b/functions/check.sh index 3a2589bda..669f91223 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -2,7 +2,7 @@ # LGSM fn_check function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Overall function for managing checks. # Runs checks that will either halt on or fix an issue. diff --git a/functions/check_ip.sh b/functions/check_ip.sh index 8ae3767ea..1a877c12a 100644 --- a/functions/check_ip.sh +++ b/functions/check_ip.sh @@ -2,7 +2,7 @@ # LGSM check_ip.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Automatically identifies the server interface IP. # If multiple interfaces are detected the user will need to manualy set using ip="0.0.0.0". diff --git a/functions/check_logs.sh b/functions/check_logs.sh index 7adbbbe03..92ed2cad1 100644 --- a/functions/check_logs.sh +++ b/functions/check_logs.sh @@ -2,7 +2,7 @@ # LGSM check_logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Checks that log files exist on server start diff --git a/functions/check_root.sh b/functions/check_root.sh index 126814f4a..3f62a5d30 100644 --- a/functions/check_root.sh +++ b/functions/check_root.sh @@ -2,7 +2,7 @@ # LGSM check_root.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" if [ $(whoami) = "root" ]; then fn_printfailnl "Do NOT run this script as root!" diff --git a/functions/check_steamcmd.sh b/functions/check_steamcmd.sh index f765db04f..049867eda 100644 --- a/functions/check_steamcmd.sh +++ b/functions/check_steamcmd.sh @@ -2,7 +2,7 @@ # LGSM check_steamcmd.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD diff --git a/functions/check_steamuser.sh b/functions/check_steamuser.sh index b0ada26e2..a807dc70e 100644 --- a/functions/check_steamuser.sh +++ b/functions/check_steamuser.sh @@ -2,7 +2,7 @@ # LGSM check_steamuser.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" if [ "${steamuser}" == "username" ]; then fn_printfailnl "Steam login not set. Update steamuser." diff --git a/functions/check_systemdir.sh b/functions/check_systemdir.sh index 63dac0022..30a192609 100644 --- a/functions/check_systemdir.sh +++ b/functions/check_systemdir.sh @@ -2,7 +2,7 @@ # LGSM check_systemdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" if [ ! -d "${systemdir}" ]; then fn_printfailnl "Cannot access ${systemdir}: No such directory" diff --git a/functions/check_tmux.sh b/functions/check_tmux.sh index 72ca41535..ac142ebe4 100644 --- a/functions/check_tmux.sh +++ b/functions/check_tmux.sh @@ -2,7 +2,7 @@ # LGSM check_tmux.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Checks if tmux is installed as too many users do not RTFM or know how to use Google. diff --git a/functions/command_backup.sh b/functions/command_backup.sh index 851876cc4..6a2f9d301 100644 --- a/functions/command_backup.sh +++ b/functions/command_backup.sh @@ -2,7 +2,7 @@ # LGSM command_backup.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Creates a .tar.gz file in the backup directory. diff --git a/functions/command_console.sh b/functions/command_console.sh index e9eeb0896..9f3476d1c 100644 --- a/functions/command_console.sh +++ b/functions/command_console.sh @@ -2,7 +2,7 @@ # LGSM command_console.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Gives access to the server tmux console. diff --git a/functions/command_debug.sh b/functions/command_debug.sh index eb371c966..e58fe0ab4 100644 --- a/functions/command_debug.sh +++ b/functions/command_debug.sh @@ -2,7 +2,7 @@ # LGSM command_debug.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Runs the server without tmux. Runs direct from the terminal. diff --git a/functions/command_details.sh b/functions/command_details.sh index 579367253..67fc510ce 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -2,7 +2,7 @@ # LGSM command_details.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Displays server infomation. diff --git a/functions/command_install.sh b/functions/command_install.sh index 29bcdd926..8f8d0a8ec 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -2,7 +2,7 @@ # LGSM fn_install function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" check_root.sh install_header.sh diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index dc6a034b1..91498d919 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -2,7 +2,7 @@ # LGSM command_monitor.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Monitors server by checking for running proccesses # then passes to monitor_gsquery.sh. diff --git a/functions/command_start.sh b/functions/command_start.sh index cbf16c97a..7e6b2613c 100644 --- a/functions/command_start.sh +++ b/functions/command_start.sh @@ -2,7 +2,7 @@ # LGSM command_start.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Starts the server. diff --git a/functions/command_stop.sh b/functions/command_stop.sh index 4598fada8..63ba310f1 100644 --- a/functions/command_stop.sh +++ b/functions/command_stop.sh @@ -2,7 +2,7 @@ # LGSM command_stop.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Stops the server. diff --git a/functions/command_validate.sh b/functions/command_validate.sh index 7a38488a3..7d62f0dd5 100644 --- a/functions/command_validate.sh +++ b/functions/command_validate.sh @@ -2,7 +2,7 @@ # LGSM command_validate.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Runs a server validation. diff --git a/functions/compress_unreal2_maps.sh b/functions/compress_unreal2_maps.sh index 7b185bd52..5992cb8f6 100644 --- a/functions/compress_unreal2_maps.sh +++ b/functions/compress_unreal2_maps.sh @@ -2,7 +2,7 @@ # LGSM compress_unreal2_maps.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" check_root.sh clear diff --git a/functions/compress_ut99_maps.sh b/functions/compress_ut99_maps.sh index 7bef3c360..ba14cb663 100644 --- a/functions/compress_ut99_maps.sh +++ b/functions/compress_ut99_maps.sh @@ -2,7 +2,7 @@ # LGSM compress_ut99_maps.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" check_root.sh clear diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 406fb7417..363727a84 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -2,7 +2,7 @@ # LGSM core_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index d56946183..593c7bd09 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -2,7 +2,7 @@ # LGSM core_getopt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: getopt arguments. diff --git a/functions/core_messages.sh b/functions/core_messages.sh index a8d55cb5b..939e73889 100644 --- a/functions/core_messages.sh +++ b/functions/core_messages.sh @@ -2,7 +2,7 @@ # LGSM fn_messages function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Defines on-screen messages such as [ OK ] and how script logs look. diff --git a/functions/dev_debug.sh b/functions/dev_debug.sh index 73a4cc4cf..ed92a90e3 100644 --- a/functions/dev_debug.sh +++ b/functions/dev_debug.sh @@ -2,7 +2,7 @@ # LGSM dev_debug.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" if [ -f ".dev-debug" ]; then rm .dev-debug diff --git a/functions/dev_detect_deps.sh b/functions/dev_detect_deps.sh index 7066aea81..03069ea8e 100644 --- a/functions/dev_detect_deps.sh +++ b/functions/dev_detect_deps.sh @@ -2,7 +2,7 @@ # LGSM fn_dep_detect function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Detects dependencies the server binary requires. diff --git a/functions/email.sh b/functions/email.sh index 75b0d66cf..ba5d47717 100644 --- a/functions/email.sh +++ b/functions/email.sh @@ -2,7 +2,7 @@ # LGSM email.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Sends email notification if monitor picks up a failure. diff --git a/functions/email_test.sh b/functions/email_test.sh index 524857864..388c17bf9 100644 --- a/functions/email_test.sh +++ b/functions/email_test.sh @@ -2,7 +2,7 @@ # LGSM email_test.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Sends a test email notification. diff --git a/functions/fix_arma3.sh b/functions/fix_arma3.sh index 5dd392295..2240b0fb7 100644 --- a/functions/fix_arma3.sh +++ b/functions/fix_arma3.sh @@ -2,7 +2,7 @@ # LGSM fix_arma3.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Fixes line 63: 20150 Segmentation fault (core dumped) #488 diff --git a/functions/fix_csgo.sh b/functions/fix_csgo.sh index 43b3bef1e..1a794404f 100644 --- a/functions/fix_csgo.sh +++ b/functions/fix_csgo.sh @@ -2,7 +2,7 @@ # LGSM fix_csgo.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Resolves various issues with csgo. diff --git a/functions/fix_glibc.sh b/functions/fix_glibc.sh index abd23db4f..a19daeab0 100644 --- a/functions/fix_glibc.sh +++ b/functions/fix_glibc.sh @@ -2,7 +2,7 @@ # LGSM fix_glibc.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" fn_glibcfixmsg(){ echo "" diff --git a/functions/fix_ins.sh b/functions/fix_ins.sh index 80f116080..dfb12eafe 100644 --- a/functions/fix_ins.sh +++ b/functions/fix_ins.sh @@ -2,7 +2,7 @@ # LGSM fix_ins.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Resolves various issues with Insurgency. diff --git a/functions/fn_functions b/functions/fn_functions index 2df618f10..f6ea53f55 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -2,7 +2,7 @@ # LGSM core_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Redirect to new core_functions.sh diff --git a/functions/fn_getopt b/functions/fn_getopt index 5d5e2a25f..8b52e1865 100644 --- a/functions/fn_getopt +++ b/functions/fn_getopt @@ -2,7 +2,7 @@ # LGSM core_getopt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Redirect to new core_getopt.sh diff --git a/functions/info_config.sh b/functions/info_config.sh index 1484ccd3c..a342e2a52 100644 --- a/functions/info_config.sh +++ b/functions/info_config.sh @@ -2,7 +2,7 @@ # LGSM info_config.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" # Description: Gets specific details from config files. diff --git a/functions/info_distro.sh b/functions/info_distro.sh index 3a8def74e..7dc40c549 100644 --- a/functions/info_distro.sh +++ b/functions/info_distro.sh @@ -2,7 +2,7 @@ # LGSM info_distro.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="211215" +lgsm_version="271215" # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and email.sh. diff --git a/functions/info_glibc.sh b/functions/info_glibc.sh index c01c282c4..481bafa7a 100644 --- a/functions/info_glibc.sh +++ b/functions/info_glibc.sh @@ -2,7 +2,7 @@ # LGSM info_glibc.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: stores details on servers Glibc requirements. diff --git a/functions/info_ts3status.sh b/functions/info_ts3status.sh index b7578fef2..9e7e16a4a 100644 --- a/functions/info_ts3status.sh +++ b/functions/info_ts3status.sh @@ -2,7 +2,7 @@ # LGSM check_ts3status.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Checks the status of Teamspeak 3. diff --git a/functions/install_complete.sh b/functions/install_complete.sh index 6e0dfad47..1961fa0e4 100644 --- a/functions/install_complete.sh +++ b/functions/install_complete.sh @@ -2,7 +2,7 @@ # LGSM install_complete.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" if [ "${gamename}" == "Dont Starve Together" ]; then echo "" diff --git a/functions/install_config.sh b/functions/install_config.sh index 20324bc37..117f675e0 100644 --- a/functions/install_config.sh +++ b/functions/install_config.sh @@ -2,7 +2,7 @@ # LGSM install_config.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="251215" +lgsm_version="271215" fn_defaultconfig(){ echo "creating ${servercfg} config file." diff --git a/functions/install_dl_ut2k4.sh b/functions/install_dl_ut2k4.sh index 9dd7e3029..d8c930fa6 100644 --- a/functions/install_dl_ut2k4.sh +++ b/functions/install_dl_ut2k4.sh @@ -2,7 +2,7 @@ # LGSM install_dl_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Downloading Server Files" echo "=================================" diff --git a/functions/install_dl_ut99.sh b/functions/install_dl_ut99.sh index f0982bce4..d77598d07 100644 --- a/functions/install_dl_ut99.sh +++ b/functions/install_dl_ut99.sh @@ -2,7 +2,7 @@ # LGSM install_dl_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Downloading Server Files" echo "=================================" diff --git a/functions/install_fix_kf.sh b/functions/install_fix_kf.sh index 623f2c8a4..324602ff5 100644 --- a/functions/install_fix_kf.sh +++ b/functions/install_fix_kf.sh @@ -2,7 +2,7 @@ # LGSM install_fix_kf.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Applying ${gamename} Server Fixes" echo "=================================" diff --git a/functions/install_fix_ro.sh b/functions/install_fix_ro.sh index 9525730c0..2fe53cb4f 100644 --- a/functions/install_fix_ro.sh +++ b/functions/install_fix_ro.sh @@ -2,7 +2,7 @@ # LGSM install_fix_ro.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Applying ${gamename} Server Fixes" echo "=================================" diff --git a/functions/install_fix_steam.sh b/functions/install_fix_steam.sh index c322b4d0c..2a2d5d656 100644 --- a/functions/install_fix_steam.sh +++ b/functions/install_fix_steam.sh @@ -2,7 +2,7 @@ # LGSM install_fix_steam.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" fn_steamclientfix(){ echo "" diff --git a/functions/install_fix_ut2k4.sh b/functions/install_fix_ut2k4.sh index 61ec724fd..e6b321463 100644 --- a/functions/install_fix_ut2k4.sh +++ b/functions/install_fix_ut2k4.sh @@ -2,7 +2,7 @@ # LGSM install_fix_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Applying ${gamename} Server Fixes" echo "=================================" diff --git a/functions/install_fix_ut99.sh b/functions/install_fix_ut99.sh index 6dc439539..dd16f921b 100644 --- a/functions/install_fix_ut99.sh +++ b/functions/install_fix_ut99.sh @@ -2,7 +2,7 @@ # LGSM install_fix_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Applying ${gamename} Server Fixes" echo "=================================" diff --git a/functions/install_gslt.sh b/functions/install_gslt.sh index 2a697b5f9..5919fac33 100644 --- a/functions/install_gslt.sh +++ b/functions/install_gslt.sh @@ -2,7 +2,7 @@ # LGSM install_gslt.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="091215" +lgsm_version="271215" # Description: Configures GSLT. diff --git a/functions/install_gsquery.sh b/functions/install_gsquery.sh index f24adf0ba..a113ea829 100644 --- a/functions/install_gsquery.sh +++ b/functions/install_gsquery.sh @@ -2,7 +2,7 @@ # LGSM install_gsquery.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" fn_dlgsquery(){ cd "${rootdir}" diff --git a/functions/install_header.sh b/functions/install_header.sh index 1e467d9e6..1ee637c77 100644 --- a/functions/install_header.sh +++ b/functions/install_header.sh @@ -2,7 +2,7 @@ # LGSM install_header.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" clear echo "=================================" diff --git a/functions/install_logs.sh b/functions/install_logs.sh index 968b396d6..6496ad647 100644 --- a/functions/install_logs.sh +++ b/functions/install_logs.sh @@ -2,7 +2,7 @@ # LGSM install_logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" if [ "${checklogs}" != "1" ]; then echo "" diff --git a/functions/install_retry.sh b/functions/install_retry.sh index ec5adde2d..2e7697af5 100644 --- a/functions/install_retry.sh +++ b/functions/install_retry.sh @@ -2,7 +2,7 @@ # LGSM install_retry.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" while true; do read -e -i "y" -p "Retry install? [Y/n]" yn diff --git a/functions/install_serverdir.sh b/functions/install_serverdir.sh index 87c34a435..fb9f713b6 100644 --- a/functions/install_serverdir.sh +++ b/functions/install_serverdir.sh @@ -2,7 +2,7 @@ # LGSM install_serverdir.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" echo "" echo "Server Directory" diff --git a/functions/install_serverfiles.sh b/functions/install_serverfiles.sh index 7842350d9..e21ace3f7 100644 --- a/functions/install_serverfiles.sh +++ b/functions/install_serverfiles.sh @@ -2,7 +2,7 @@ # LGSM finstall_serverfiles.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" fn_steaminstallcommand(){ check_steamuser.sh diff --git a/functions/install_steamcmd.sh b/functions/install_steamcmd.sh index 6d075b537..094310191 100644 --- a/functions/install_steamcmd.sh +++ b/functions/install_steamcmd.sh @@ -2,7 +2,7 @@ # LGSM install_steamcmd.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Downloads SteamCMD on install. diff --git a/functions/install_ts3.sh b/functions/install_ts3.sh index cef10aca4..3860fbc50 100644 --- a/functions/install_ts3.sh +++ b/functions/install_ts3.sh @@ -2,7 +2,7 @@ # LGSM install_ts3.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="251215" +lgsm_version="271215" info_distro.sh # Gets the teamspeak server architecture diff --git a/functions/install_ts3db.sh b/functions/install_ts3db.sh index a69183297..82ba5a6fa 100644 --- a/functions/install_ts3db.sh +++ b/functions/install_ts3db.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributor: PhilPhonic # Website: http://gameservermanagers.com -lgsm_version="261215" +lgsm_version="271215" fn_install_ts3db_mariadb(){ echo "" diff --git a/functions/install_ut2k4.sh b/functions/install_ut2k4.sh index ef432196f..fe4e428e4 100644 --- a/functions/install_ut2k4.sh +++ b/functions/install_ut2k4.sh @@ -2,7 +2,7 @@ # LGSM install_ut2k4.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Installing ${gamename} Server" echo "=================================" diff --git a/functions/install_ut2k4_key.sh b/functions/install_ut2k4_key.sh index 41658391d..10143a736 100644 --- a/functions/install_ut2k4_key.sh +++ b/functions/install_ut2k4_key.sh @@ -2,7 +2,7 @@ # LGSM install_ut2k4_key.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Enter ${gamename} CD Key" echo "=================================" diff --git a/functions/install_ut99.sh b/functions/install_ut99.sh index ce894abfc..c1b5a91a5 100644 --- a/functions/install_ut99.sh +++ b/functions/install_ut99.sh @@ -2,7 +2,7 @@ # LGSM install_ut99.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" echo "Installing ${gamename} Server" echo "=================================" diff --git a/functions/logs.sh b/functions/logs.sh index 5afde8c2c..ecca143c0 100644 --- a/functions/logs.sh +++ b/functions/logs.sh @@ -2,7 +2,7 @@ # LGSM logs.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Acts as a log rotater, removing old logs. diff --git a/functions/monitor_gsquery.sh b/functions/monitor_gsquery.sh index bcc7203b8..55e2e9fc2 100644 --- a/functions/monitor_gsquery.sh +++ b/functions/monitor_gsquery.sh @@ -2,7 +2,7 @@ # LGSM monitor_gsquery.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: uses gsquery.py to directly query the server. # Detects if the server has frozen. diff --git a/functions/update_check.sh b/functions/update_check.sh index ff2a1c9d9..e722e4e17 100644 --- a/functions/update_check.sh +++ b/functions/update_check.sh @@ -2,7 +2,7 @@ # LGSM update_check.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="201215" +lgsm_version="271215" # Description: Checks if a server update is available. diff --git a/functions/update_dl.sh b/functions/update_dl.sh index 18c62f144..aa9fc51b2 100644 --- a/functions/update_dl.sh +++ b/functions/update_dl.sh @@ -2,7 +2,7 @@ # LGSM update_dl.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Runs a server update. diff --git a/functions/update_functions.sh b/functions/update_functions.sh index 55c12a218..746db023a 100644 --- a/functions/update_functions.sh +++ b/functions/update_functions.sh @@ -2,7 +2,7 @@ # LGSM update_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="061115" +lgsm_version="271215" # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. From 879a1ce144bc998087d907122cc582dbdcb2c480 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:23:05 +0000 Subject: [PATCH 35/45] Re-ordered functions grouped functions together. --- functions/core_functions.sh | 137 ++++++++++++++++++++++++------------ 1 file changed, 92 insertions(+), 45 deletions(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 363727a84..2ba12010e 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -7,127 +7,170 @@ lgsm_version="271215" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. -fix_arma3.sh(){ +#Legacy functions + +fn_functions(){ functionfile="${FUNCNAME}" fn_runfunction } -command_backup.sh(){ +fn_getopt(){ functionfile="${FUNCNAME}" fn_runfunction } -check.sh(){ + +# Core + +core_getopt.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_ip.sh(){ +core_messages.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_logs.sh(){ + +# Command + +command_console.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_root.sh(){ +command_debug.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_steamcmd.sh(){ +command_details.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_steamuser.sh(){ +command_backup.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_systemdir.sh(){ +command_monitor.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_tmux.sh(){ +command_start.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -check_ts3status.sh(){ +command_stop.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -command_console.sh(){ +command_validate.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -compress_unreal2_maps.sh(){ +command_install.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -compress_ut99_maps.sh(){ +fn_restart(){ +local modulename="Restarting" +info_config.sh +fn_scriptlog "${servername}" +command_stop.sh +command_start.sh +} + + +# Checks + +check.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fix_csgo.sh(){ +check_ip.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -command_debug.sh(){ +check_logs.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -command_details.sh(){ +check_root.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -info_config.sh(){ +check_steamcmd.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -info_distro.sh(){ +check_steamuser.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -info_glibc.sh(){ +check_systemdir.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -dev_debug.sh(){ +check_tmux.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -dev_detect_deps.sh(){ +check_ts3status.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -email.sh(){ + +# Compress + +compress_unreal2_maps.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -email_test.sh(){ +compress_ut99_maps.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -core_getopt.sh(){ + +# Dev + +dev_debug.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + +dev_detect_deps.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + + +# Fix + +fix_arma3.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + +fix_csgo.sh(){ functionfile="${FUNCNAME}" fn_runfunction } @@ -137,44 +180,56 @@ functionfile="${FUNCNAME}" fn_runfunction } -logs.sh(){ + +# Info + +info_config.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -core_messages.sh(){ +info_distro.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -command_monitor.sh(){ +info_glibc.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -monitor_gsquery.sh(){ + +# Email + +email.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -fn_restart(){ -local modulename="Restarting" -info_config.sh -fn_scriptlog "${servername}" -command_stop.sh -command_start.sh +email_test.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction } -command_start.sh(){ + +# Logs + +logs.sh(){ functionfile="${FUNCNAME}" fn_runfunction } -command_stop.sh(){ + +# Monitor + +monitor_gsquery.sh(){ functionfile="${FUNCNAME}" fn_runfunction } + +# Update + update_check.sh(){ functionfile="${FUNCNAME}" fn_runfunction @@ -195,10 +250,6 @@ functionfile="${FUNCNAME}" fn_runfunction } -command_validate.sh(){ -functionfile="${FUNCNAME}" -fn_runfunction -} # ## Installer functions @@ -209,10 +260,6 @@ autoinstall=1 command_install.sh } -command_install.sh(){ -functionfile="${FUNCNAME}" -fn_runfunction -} install_complete.sh(){ functionfile="${FUNCNAME}" From 83e6f031e68b882a36bdf6a242fdb6c107729e05 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:24:36 +0000 Subject: [PATCH 36/45] tidy --- functions/core_functions.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 2ba12010e..33f04ddc4 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -260,7 +260,6 @@ autoinstall=1 command_install.sh } - install_complete.sh(){ functionfile="${FUNCNAME}" fn_runfunction From 98dd71ec3904458fa48585efdf4f3463dcae9cb4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 20:43:54 +0000 Subject: [PATCH 37/45] Added fix for auto-install Bypasses code for MariaDB/MySQL and warns users have use auto-install sqlite is being used --- functions/install_ts3db.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/functions/install_ts3db.sh b/functions/install_ts3db.sh index 82ba5a6fa..f7654ce07 100644 --- a/functions/install_ts3db.sh +++ b/functions/install_ts3db.sh @@ -41,15 +41,19 @@ fn_install_ts3db_mariadb(){ sleep 1 } -echo "" -while true; do - read -e -i "n" -p "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)? [y/N]" yn - case $yn in - [Yy]* ) fn_install_ts3db_mariadb && break;; - [Nn]* ) break;; - * ) echo "Please answer yes or no.";; - esac -done +if [ -z "${autoinstall}" ]; then + echo "" + while true; do + read -e -i "n" -p "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)? [y/N]" yn + case $yn in + [Yy]* ) fn_install_ts3db_mariadb && break;; + [Nn]* ) break;; + * ) echo "Please answer yes or no.";; + esac + done +else +fn_printwarningnl "./${selfname} auto-install is uses sqlite. For MariaDB/MySQL use ./${selfname} install" +fi ## Get privilege key echo "" From 06ee0b869b920b94b6be367c664219f63dcb1709 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 22:28:46 +0000 Subject: [PATCH 38/45] Updated ts3 server tests --- tests/tests_jc2server.sh | 2 +- tests/tests_ts3server.sh | 64 ++++++++++++++++++++++++++++++++-------- 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 09b8383f7..61b326506 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -42,7 +42,7 @@ engine="avalanche" # Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 7347e8883..b3207c368 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -22,7 +22,7 @@ servicename="ts3-server" # Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" -selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" lockselfname=".${servicename}.lock" filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" @@ -31,8 +31,10 @@ executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" + # Logging logdays="7" gamelogdir="${filesdir}/logs" @@ -43,23 +45,59 @@ emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" +#### Advanced Variables #### + +# Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="dgibbs64" +githubrepo="linuxgsm" +githubbranch="$TRAVIS_BRANCH" + ##### Script ##### # Do not edit -fn_runfunction(){ -# Functions are downloaded and run with this function -if [ ! -f "${rootdir}/functions/${functionfile}" ]; then - cd "${rootdir}" - if [ ! -d "functions" ]; then - mkdir functions +fn_getgithubfile(){ +filename=$1 +exec=$2 +fileurl=${3:-$filename} +filepath="${rootdir}/${filename}" +filedir=$(dirname "${filepath}") +# If the function file is missing, then download +if [ ! -f "${filepath}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir "${filedir}" + fi + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}" + echo -e " fetching ${filename}...\c" + if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then + : + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit fi - cd functions - echo -e " loading ${functionfile}...\c" - wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- - chmod +x "${functionfile}" - cd "${rootdir}" + curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curl}" + echo -e "${githuburl}\n" + exit + else + echo -e "\e[0;32mOK\e[0m" + fi + if [ "${exec}" ]; then + chmod +x "${filepath}" + fi +fi +if [ "${exec}" ]; then + source "${filepath}" fi -source "${rootdir}/functions/${functionfile}" +} + +fn_runfunction(){ + fn_getgithubfile "functions/${functionfile}" 1 } core_functions.sh(){ From fdce54ff0523c88e44eecc2038ce000aa309391f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 22:53:21 +0000 Subject: [PATCH 39/45] renamed check_ts3status.sh to info_ts3status.sh --- functions/check.sh | 2 +- functions/command_details.sh | 2 +- functions/command_monitor.sh | 2 +- functions/command_start.sh | 4 ++-- functions/command_stop.sh | 2 +- functions/core_functions.sh | 2 +- functions/info_ts3status.sh | 2 +- functions/update_check.sh | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index 669f91223..d5dd62904 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -45,4 +45,4 @@ if [ $? != 0 ]; then check_tmux.sh fi -#check_ts3status.sh # may need to move out of checks \ No newline at end of file +#info_ts3status.sh # may need to move out of checks \ No newline at end of file diff --git a/functions/command_details.sh b/functions/command_details.sh index 67fc510ce..927f0beb7 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -105,7 +105,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = # online status if [ "${gamename}" == "Teamspeak 3" ]; then - check_ts3status.sh + info_ts3status.sh if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" else diff --git a/functions/command_monitor.sh b/functions/command_monitor.sh index 91498d919..f99409f8d 100644 --- a/functions/command_monitor.sh +++ b/functions/command_monitor.sh @@ -27,7 +27,7 @@ fi fn_printdots "Checking session: CHECKING" fn_scriptlog "Checking session: CHECKING" sleep 1 -check_ts3status.sh +info_ts3status.sh if [ "${ts3status}" = "Server is running" ]; then fn_printok "Checking session: OK" fn_scriptlog "Checking session: OK" diff --git a/functions/command_start.sh b/functions/command_start.sh index 7e6b2613c..9c72ae108 100644 --- a/functions/command_start.sh +++ b/functions/command_start.sh @@ -12,7 +12,7 @@ fn_start_teamspeak3(){ check_root.sh check_systemdir.sh check_logs.sh -check_ts3status.sh +info_ts3status.sh if [ "${ts3status}" != "Server is running" ]; then # Will check for updates is updateonstart is yes @@ -58,7 +58,7 @@ date > "${rootdir}/${lockselfname}" cd "${executabledir}" ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 sleep 1 -check_ts3status.sh +info_ts3status.sh if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then fn_printfailnl "Unable to start ${servername}" fn_scriptlog "Unable to start ${servername}" diff --git a/functions/command_stop.sh b/functions/command_stop.sh index 63ba310f1..d567489e0 100644 --- a/functions/command_stop.sh +++ b/functions/command_stop.sh @@ -34,7 +34,7 @@ check_systemdir.sh fn_printdots "${servername}" fn_scriptlog "${servername}" sleep 1 -check_ts3status.sh +info_ts3status.sh if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then fn_printfail "${servername} is already stopped" fn_scriptlog "${servername} is already stopped" diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 33f04ddc4..8ce5d4681 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -131,7 +131,7 @@ functionfile="${FUNCNAME}" fn_runfunction } -check_ts3status.sh(){ +info_ts3status.sh(){ functionfile="${FUNCNAME}" fn_runfunction } diff --git a/functions/info_ts3status.sh b/functions/info_ts3status.sh index 9e7e16a4a..c08f95f1d 100644 --- a/functions/info_ts3status.sh +++ b/functions/info_ts3status.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_ts3status.sh function +# LGSM info_ts3status.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com lgsm_version="271215" diff --git a/functions/update_check.sh b/functions/update_check.sh index e722e4e17..f1b9ae78a 100644 --- a/functions/update_check.sh +++ b/functions/update_check.sh @@ -274,7 +274,7 @@ if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then fn_scriptlog "Current build: ${currentbuild}" fn_scriptlog "Available build: ${availablebuild}" fn_scriptlog "${currentbuild} > ${availablebuild}" - check_ts3status.sh + info_ts3status.sh if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then update_dl.sh command_start.sh From 71b62214421608d254e8d614abe9d865dc021626 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 22:59:09 +0000 Subject: [PATCH 40/45] Added function name details --- functions/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/functions/README.md b/functions/README.md index bb76d811c..2b3ffc9bd 100644 --- a/functions/README.md +++ b/functions/README.md @@ -2,3 +2,15 @@ These functions are universal functions that work in all scripts. +

Function Names

+Functions have been named to give an idea of what the function does + +* core: Essential functions that are will always run first. +* command: Primary command function. +* check: Runs checks that will either halt on or fix an issue. +* dev: development functions. +* fix: Applies a game server specific fix. +* info: retrieves information from a source such as config file or the OS. +* install: Functions related to the installer. +* monitor: Functions related to monitor. +* update: Functions that update the game server. \ No newline at end of file From 739596714d254060415185f51481b7219c48d4cb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 23:00:11 +0000 Subject: [PATCH 41/45] Update README.md --- functions/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/README.md b/functions/README.md index 2b3ffc9bd..f18a8a161 100644 --- a/functions/README.md +++ b/functions/README.md @@ -3,7 +3,7 @@ These functions are universal functions that work in all scripts.

Function Names

-Functions have been named to give an idea of what the function does +Functions have been named to give an idea of what the function does. * core: Essential functions that are will always run first. * command: Primary command function. @@ -13,4 +13,4 @@ Functions have been named to give an idea of what the function does * info: retrieves information from a source such as config file or the OS. * install: Functions related to the installer. * monitor: Functions related to monitor. -* update: Functions that update the game server. \ No newline at end of file +* update: Functions that update the game server. From 61ac50788004bc0db6c41ad5a438976585437a10 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 23:26:44 +0000 Subject: [PATCH 42/45] Added waffle.io badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b69d5dc8a..6b7056b55 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ linux Game Server Managers [![Build Status](https://travis-ci.org/dgibbs64/linuxgsm.svg?branch=master)](https://travis-ci.org/dgibbs64/linuxgsm) +[![Under Development](https://badge.waffle.io/dgibbs64/linuxgsm.svg?label=Under%20Development&title=Under%20Development)](http://waffle.io/dgibbs64/linuxgsm) The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice comms servers. @@ -49,4 +50,4 @@ If you want to donate to the project you can via PayPal, Flattr or Gratipay. I h
  • Twitter
  • Facebook
  • Google+
  • - \ No newline at end of file + From 4b7a2c55b1a68dc72d6017f91e67e48f37154f36 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 23:32:05 +0000 Subject: [PATCH 43/45] removed comment --- functions/check.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index d5dd62904..61c8083ce 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -43,6 +43,4 @@ check_ip=( start ) fn_module_compare "${cmd}" "${no_check_logs[@]}" if [ $? != 0 ]; then check_tmux.sh -fi - -#info_ts3status.sh # may need to move out of checks \ No newline at end of file +fi \ No newline at end of file From 23732223b1ec1547feca1718aad4037811f47769 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 23:37:14 +0000 Subject: [PATCH 44/45] moved ts3status --- functions/core_functions.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 8ce5d4681..868f65885 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -131,11 +131,6 @@ functionfile="${FUNCNAME}" fn_runfunction } -info_ts3status.sh(){ -functionfile="${FUNCNAME}" -fn_runfunction -} - # Compress @@ -198,6 +193,11 @@ functionfile="${FUNCNAME}" fn_runfunction } +info_ts3status.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + # Email From 537748dc89f18d1516fe198c735e3c795128e674 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Dec 2015 23:43:00 +0000 Subject: [PATCH 45/45] Corrected incorrectly named functions --- functions/core_getopt.sh | 26 +++++++++++++------------- functions/fix_csgo.sh | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/functions/core_getopt.sh b/functions/core_getopt.sh index 593c7bd09..93b0a005c 100644 --- a/functions/core_getopt.sh +++ b/functions/core_getopt.sh @@ -6,7 +6,7 @@ lgsm_version="271215" # Description: getopt arguments. -core_getopt.sh_generic(){ +fn_getopt_generic(){ case "$getopt" in st|start) command_start.sh;; @@ -70,7 +70,7 @@ case "$getopt" in exit } -core_getopt.sh_teamspeak3(){ +fn_getopt_teamspeak3(){ case "$getopt" in st|start) command_start.sh;; @@ -121,7 +121,7 @@ case "$getopt" in exit } -core_getopt.sh_mumble(){ +fn_getopt_mumble(){ case "$getopt" in st|start) command_start.sh;; @@ -166,7 +166,7 @@ case "$getopt" in exit } -core_getopt.sh_gmodserver(){ +fn_getopt_gmodserver(){ case "$getopt" in st|start) command_start.sh;; @@ -233,7 +233,7 @@ case "$getopt" in exit } -core_getopt.sh_unreal(){ +fn_getopt_unreal(){ case "$getopt" in st|start) command_start.sh;; @@ -288,7 +288,7 @@ exit } -core_getopt.sh_unreal2(){ +fn_getopt_unreal2(){ case "$getopt" in st|start) command_start.sh;; @@ -356,7 +356,7 @@ exit } -core_getopt.sh_ut2k4(){ +fn_getopt_ut2k4(){ case "$getopt" in st|start) command_start.sh;; @@ -411,17 +411,17 @@ exit } if [ "${gamename}" == "Mumble" ]; then - core_getopt.sh_mumble + fn_getopt__mumble elif [ "${gamename}" == "Teamspeak 3" ]; then - core_getopt.sh_teamspeak3 + fn_getopt_teamspeak3 elif [ "${engine}" == "unreal2" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then - core_getopt.sh_ut2k4 + fn_getopt_ut2k4 else - core_getopt.sh_unreal2 + fn_getopt_unreal2 fi elif [ "${engine}" == "unreal" ]; then - core_getopt.sh_unreal + fn_getopt_unreal else - core_getopt.sh_generic + fn_getopt_generic fi \ No newline at end of file diff --git a/functions/fix_csgo.sh b/functions/fix_csgo.sh index 1a794404f..488149b0f 100644 --- a/functions/fix_csgo.sh +++ b/functions/fix_csgo.sh @@ -19,7 +19,7 @@ if [ ! -f "${filesdir}/steam_appid.txt" ]; then fi } -fix_csgo.shes(){ +fn_csgofixes(){ # Fixes the following error: # Error parsing BotProfile.db - unknown attribute 'Rank". if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then @@ -84,5 +84,5 @@ fi if [ ! -z "${startfix}" ]; then fn_csgoappfix else - fix_csgo.shes + fn_csgofixes fi \ No newline at end of file