From 0901753364d3a768e61fd23851bfaf3f319696e3 Mon Sep 17 00:00:00 2001 From: s-eam Date: Wed, 8 Feb 2017 23:41:55 -0500 Subject: [PATCH 01/44] Abstract Y/N Prompt Logic - Modularize prompt logic into separate function (fn_prompt_yn) - Refactor scripts to utilize fn_prompt_yn - Enhance Y/N prompt interface for usability --- lgsm/functions/command_console.sh | 21 +++----- lgsm/functions/command_debug.sh | 11 ++-- lgsm/functions/command_fastdl.sh | 50 +++++++------------ .../command_install_resources_mta.sh | 11 ++-- lgsm/functions/command_mods_install.sh | 11 ++-- lgsm/functions/command_mods_remove.sh | 11 ++-- lgsm/functions/command_ts3_server_pass.sh | 11 ++-- lgsm/functions/command_wipe.sh | 13 ++--- lgsm/functions/compress_unreal2_maps.sh | 13 ++--- lgsm/functions/compress_ut99_maps.sh | 13 ++--- lgsm/functions/core_messages.sh | 24 +++++++++ lgsm/functions/install_dst_token.sh | 15 +++--- lgsm/functions/install_minecraft_eula.sh | 13 ++--- lgsm/functions/install_retry.sh | 13 ++--- lgsm/functions/install_server_dir.sh | 13 ++--- lgsm/functions/install_server_files.sh | 11 ++-- lgsm/functions/install_ts3db.sh | 11 ++-- .../install_unreal_tournament_eula.sh | 13 ++--- 18 files changed, 104 insertions(+), 174 deletions(-) diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index ee9f13b6eb..e59d24a2fa 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -13,13 +13,9 @@ fn_print_header fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." fn_print_warning_nl "Do NOT press CTRL+c to exit." 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 +if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; return +fi done fn_print_dots "Accessing console" sleep 1 @@ -35,14 +31,9 @@ else fn_print_error_nl "Server not running" fn_script_log_error "Failed to access: Server not running" sleep 1 - while true; do - read -e -i "y" -p "Do you want to start the server? [Y/n]" yn - case $yn in - [Yy]* ) exitbypass=1; command_start.sh; break;; - [Nn]* ) break;; - * ) echo "Please answer yes or no.";; - esac - done + if fn_prompt_yn "Do you want to start the server?" Y; then + exitbypass=1; command_start.sh + fi fi core_exit.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 25e855c949..a980486387 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -68,14 +68,9 @@ echo -e "Use for identifying server issues only!" echo -e "Press CTRL+c to drop out of debug mode." fn_print_warning_nl "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 +if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; return +fi fn_print_info_nl "Stopping any running servers" fn_script_log_info "Stopping any running servers" diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index c66834b984..345ff765b9 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -42,14 +42,9 @@ fn_fastdl_init(){ sleep 1 echo -en "\n" fn_script_log "Started FastDL creation" - while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + exit + fi fn_script_log "Initiating FastDL creation" # Check and create directories @@ -91,27 +86,21 @@ fn_fastdl_config(){ # Prompt for clearing old files if directory was already here if [ -n "${newfastdl}" ] && [ "${newfastdl}" == "0" ]; then fn_print_dots - while true; do - read -e -i "y" -p "Clear old FastDL files? [Y/n]" yn - case $yn in - [Yy]* ) clearoldfastdl="on"; fn_script_log "clearoldfastdl enabled"; fn_print_ok "Clearing Enabled"; break;; - [Nn]* ) clearoldfastdl="off"; fn_script_log "clearoldfastdl disabled"; fn_print_ok "Clearing Disabled"; break;; - * ) echo "Please answer yes or no.";; - esac - done + if fn_prompt_yn "Clear old FastDL files?" Y; then + clearoldfastdl="on"; fn_script_log "clearoldfastdl enabled"; fn_print_ok "Clearing Enabled" + else + clearoldfastdl="off"; fn_script_log "clearoldfastdl disabled"; fn_print_ok "Clearing Disabled" + fi echo -en "\n" fi # Prompt for using bzip2 if it's installed if [ ${bzip2installed} == 1 ]; then fn_print_dots - while true; do - read -e -i "y" -p "Enable file compression using bzip2? [Y/n]" yn - case $yn in - [Yy]* ) bzip2enable="on"; fn_script_log "bzip2 enabled"; fn_print_ok "bzip2 Enabled"; break;; - [Nn]* ) bzip2enable="off"; fn_script_log "bzip2 disabled"; fn_print_ok "bzip2 Disabled"; break;; - * ) echo "Please answer yes or no.";; - esac - done + if fn_prompt_yn "Enable file compression using bzip2?" Y; then + bzip2enable="on"; fn_script_log "bzip2 enabled"; fn_print_ok "bzip2 Enabled" + else + bzip2enable="off"; fn_script_log "bzip2 disabled"; fn_print_ok "bzip2 Disabled" + fi echo -en "\n" fi } @@ -119,14 +108,11 @@ fn_fastdl_config(){ fn_fastdl_gmod_config(){ # Prompt for download enforcer, that is using a .lua addfile resource generator fn_print_dots - while true; do - read -e -i "y" -p "Use client download enforcer? [Y/n]" yn - case $yn in - [Yy]* ) luaressource="on"; fn_script_log "DL enforcer Enabled"; fn_print_ok "Enforcer Enabled"; break;; - [Nn]* ) luaressource="off"; fn_script_log "DL enforcer Disabled"; fn_print_ok "Enforcer Disabled"; break;; - * ) echo "Please answer yes or no.";; - esac - done + if fn_prompt_yn "Use client download enforcer?" Y; then + luaressource="on"; fn_script_log "DL enforcer Enabled"; fn_print_ok "Enforcer Enabled" + else + luaressource="off"; fn_script_log "DL enforcer Disabled"; fn_print_ok "Enforcer Disabled" + fi echo -en "\n" } diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 678e412add..b4432e0f52 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -21,11 +21,6 @@ fn_install_resources(){ fn_print_header fn_print_warning_nl "Installing the default resources with existing resources may cause issues." -while true; do - read -e -i "y" -p "Do you want to install MTA default resources? [Y/n]" yn - case $yn in - [Yy]* ) fn_install_resources && break;; - [Nn]* ) break;; - * ) echo "Please answer yes or no.";; - esac -done +if fn_prompt_yn "Do you want to install MTA default resources?" Y; then + fn_install_resources +fi diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 2d85c12f6a..9610d5e915 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -87,14 +87,9 @@ if [ -f "${modsinstalledlistfullpath}" ]; then fn_script_log_warn "${modprettyname} is already installed" sleep 1 echo " * Any configs may be overwritten." - while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; core_exit.sh;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; core_exit.sh + fi fn_script_log_info "User selected to continue" fi fi diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index d63a00101a..932a3d733c 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -45,14 +45,9 @@ done fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}." echo " * Any custom files/configuration will be removed." -while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; exit;; - * ) echo "Please answer yes or no.";; -esac -done +if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; exit +fi currentmod="${usermodselect}" fn_mod_get_info diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 1a98968898..529b705b18 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -19,14 +19,9 @@ fn_serveradmin_password_prompt(){ fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password." fn_print_warning_nl "${gamename} will restart during this process." echo "" - while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; exit;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; exit + fi fn_script_log_info "Initiating ${gamename} ServerAdmin password change" read -p "Enter new password : " newpassword } diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 440c8080e9..d50e354fc3 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -105,18 +105,13 @@ fn_wipe_server_remove_files(){ if [ "${gamename}" == "Rust" ]; then if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then fn_print_warning_nl "Any user, storage, log and map data from ${serveridentitydir} will be erased." - while true; do - read -e -i "y" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; core_exit.sh;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + echo Exiting; core_exit.sh + fi fn_script_log_info "User selects to erase any user, storage, log and map data from ${serveridentitydir}" sleep 1 fn_wipe_server_process - else + else fn_print_information_nl "No data to wipe was found" fn_script_log_info "No data to wipe was found." sleep 1 diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 67d3621e2c..f2bcb21359 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -19,14 +19,9 @@ echo "Compressed maps saved to:" echo "" echo "${compressedmapsdir}" echo "" -while true; do - read -e -i "y" -p "Start compression [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; return;; - * ) echo "Please answer yes or no.";; - esac -done +if ! fn_prompt_yn "Start compression?" Y; then + echo Exiting; return +fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 rm -rfv "${filesdir}/Maps/"*.ut2.uz2 cd "${systemdir}" @@ -34,4 +29,4 @@ for map in "${filesdir}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done mv -fv "${filesdir}/Maps/"*.ut2.uz2 "${compressedmapsdir}" -core_exit.sh \ No newline at end of file +core_exit.sh diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 3ef6e140e1..872b3da067 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -19,14 +19,9 @@ echo "Compressed maps saved to:" echo "" echo "${compressedmapsdir}" echo "" -while true; do - read -e -i "y" -p "Start compression [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) echo Exiting; return;; - * ) echo "Please answer yes or no.";; - esac -done +if ! fn_prompt_yn "Start compression?" Y; then + echo Exiting; return +fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 rm -rfv "${filesdir}/Maps/"*.unr.uz cd "${systemdir}" @@ -34,4 +29,4 @@ for map in "${filesdir}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done mv -fv "${filesdir}/Maps/"*.unr.uz "${compressedmapsdir}" -core_exit.sh \ No newline at end of file +core_exit.sh diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 540729af70..1d36231735 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -1,6 +1,7 @@ #!/bin/bash # LGSM core_messages.sh function # Author: Daniel Gibbs +# Contributor: s-eam # Website: https://gameservermanagers.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. @@ -268,6 +269,29 @@ fn_print_information_nl(){ echo -e "${cyan}Information!${default} $@" } +# Y/N Prompt +fn_prompt_yn(){ + local prompt="$1" + local initial="$2" + + if [ "${initial}" == "Y" ]; then + prompt+=" [Y/n] " + elif [ "${initial}" == "N" ]; then + prompt+=" [y/N] " + else + prompt+=" [y/n] " + fi + + while true; do + read -e -i "${initial}" -p "${prompt}" -r yn + case "${yn}" in + [Yy]|[Yy][Ee][Ss]) return 0 ;; + [Nn]|[Nn][Oo]) return 1 ;; + *) echo "Please answer yes or no." ;; + esac + done +} + # On-Screen End of Line ################################## diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index 2e9713e718..27966bcbc9 100644 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -21,15 +21,12 @@ if [ -z "${autoinstall}" ]; then if [ -s "${clustercfgdir}/cluster_token.txt" ]; then echo "The cluster token is already set. Do you want to overwrite it?" fn_script_log_info "Don't Starve Together cluster token is already set" - while true; do - read -e -i "n" -p "Continue? [Y/n]" yn - case $yn in - [Yy]* ) overwritetoken="true"; break;; - [Nn]* ) overwritetoken="false"; break;; - * ) echo "Please answer yes or no.";; - esac - done - fi + if fn_prompt_yn "Continue?" N; then + overwritetoken="true" + else + overwritetoken="false" + fi + fi if [ "${overwritetoken}" == "true" ]; then echo "Once you have the cluster token, enter it below" echo -n "Cluster Token: " diff --git a/lgsm/functions/install_minecraft_eula.sh b/lgsm/functions/install_minecraft_eula.sh index 410e283b4c..e4901979b9 100644 --- a/lgsm/functions/install_minecraft_eula.sh +++ b/lgsm/functions/install_minecraft_eula.sh @@ -16,18 +16,13 @@ echo "eula=false" > "${filesdir}/eula.txt" if [ -z "${autoinstall}" ]; then echo "By continuing you are indicating your agreement to the EULA." echo "" - while true; do - read -e -i "y" -p "Continue [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) core_exit.sh;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + core_exit.sh + fi else echo "By using auto-install you are indicating your agreement to the EULA." echo "" sleep 5 fi -sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" \ No newline at end of file +sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index d0ca16fef7..757dd65744 100644 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -8,11 +8,8 @@ local commandname="INSTALL" local commandaction="Install" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -while true; do - read -e -i "y" -p "Retry install? [Y/n]" yn - case $yn in - [Yy]* ) command_install.sh; exit;; - [Nn]* ) echo Exiting; exit;; - * ) echo "Please answer yes or no.";; - esac -done \ No newline at end of file +if fn_prompt_yn "Retry install?" Y; then + command_install.sh; exit +else + echo Exiting; exit +fi diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index d527b61933..1cd64110dc 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -19,16 +19,11 @@ if [ -d "${filesdir}" ]; then fn_print_warning_nl "A server is already installed here." fi if [ -z "${autoinstall}" ]; then - while true; do - read -e -i "y" -p "Continue [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + exit + fi fi if [ ! -d "${filesdir}" ]; then mkdir -v "${filesdir}" fi -sleep 1 \ No newline at end of file +sleep 1 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 9b099edd47..4d4dfe892a 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -146,12 +146,7 @@ fi if [ -z "${autoinstall}" ]; then echo "" echo "=================================" - while true; do - read -e -i "y" -p "Was the install successful? [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) install_retry.sh;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Was the install successful?" Y; then + install_retry.sh + fi fi diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index bada12c0ba..dec3b67730 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -48,14 +48,9 @@ fn_install_ts3db_mariadb(){ 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 + if ! fn_prompt_yn "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)?" N; then + fn_install_ts3db_mariadb + fi else fn_print_warning_nl "./${selfname} auto-install is uses sqlite. For MariaDB/MySQL use ./${selfname} install" fi diff --git a/lgsm/functions/install_unreal_tournament_eula.sh b/lgsm/functions/install_unreal_tournament_eula.sh index b39f9b2e29..f2a5eb4455 100644 --- a/lgsm/functions/install_unreal_tournament_eula.sh +++ b/lgsm/functions/install_unreal_tournament_eula.sh @@ -16,18 +16,13 @@ echo "eula=false" > "${filesdir}/eula.txt" if [ -z "${autoinstall}" ]; then echo "By continuing you are indicating your agreement to the EULA." echo "" - while true; do - read -e -i "y" -p "Continue [Y/n]" yn - case $yn in - [Yy]* ) break;; - [Nn]* ) core_exit.sh;; - * ) echo "Please answer yes or no.";; - esac - done + if ! fn_prompt_yn "Continue?" Y; then + core_exit.sh + fi else echo "By using auto-install you are indicating your agreement to the EULA." echo "" sleep 5 fi -sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" \ No newline at end of file +sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt" From a05358dd0688e27ab3be34766c1d4e1cc262a7c9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 15 Feb 2017 21:25:56 +0000 Subject: [PATCH 02/44] optimsed availablebuild var no longer has so many | --- lgsm/functions/update_steamcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 167daf5fb8..6d2b6780a9 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -156,7 +156,7 @@ fn_update_steamcmd_check(){ fi # Gets availablebuild info - availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"${branchname}\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) + availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | sed -n '/branch/,$p' | grep -m 1 buildid | tr -cd '[:digit:]') if [ -z "${availablebuild}" ]; then fn_print_fail "Checking for update: SteamCMD" sleep 1 From 89c4352c1bd549c35680fee71c803efde61fd7ea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 00:55:34 +0000 Subject: [PATCH 03/44] Added Ballistic Overkill --- lgsm/functions/info_glibc.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 12ba262a4e..5b821054d8 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -6,7 +6,13 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gamename}" == "Black Mesa: Deathmatch" ]; then +if [ "${gamename}" == "ARK: Survival Evolved" ]; then + glibcrequired="2.15" + glibcfix="no" +elif [ "${gamename}" == "Ballistic Overkill" ]; then + glibcrequired="2.15" + glibcfix="yes" +elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then glibcrequired="2.15" glibcfix="yes" elif [ "${gamename}" == "Blade Symphony" ]; then @@ -68,6 +74,9 @@ elif [ "${gamename}" == "Quake 3: Arena" ]; then elif [ "${gamename}" == "Quake Live" ]; then glibcrequired="2.15" glibcfix="no" +elif [ "${gamename}" == "Sven Co-op" ]; then + glibcrequired="2.18" + glibcfix="no" elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" From ef056b3d35b525e6e04f47ad68324e02667d2053 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 02:02:12 +0000 Subject: [PATCH 04/44] ballistic overkill config --- lgsm/functions/info_config.sh | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 0164999a33..90c144d80a 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -554,6 +554,36 @@ fn_info_config_unreal(){ fi } +fn_info_config_ballistic_overkill(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + gamemode="${unavailable}" + gameworld="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + + maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') + gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} + fi +} + fn_info_config_sdtd(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -646,6 +676,9 @@ if [ "${engine}" == "avalanche" ]; then # ARK: Survival Evolved elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_info_config_ark +# Ballistic Overkill +elif [ "${gamename}" == "Ballistic Overkill" ]; then + fn_info_config_ballistic_overkill # Battlefield: 1942 elif [ "${gamename}" == "Battlefield: 1942" ]; then fn_info_config_bf1942 @@ -664,7 +697,7 @@ elif [ "${gamename}" == "Call of Duty: World at War" ]; then # Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve -# Factorio +# Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio # Quake 2 From 7450c599d7d245fdafbe7055a9c7ae5c54e55112 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 18:52:17 +0000 Subject: [PATCH 05/44] nl --- lgsm/functions/command_mods_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 2d85c12f6a..4af7f8913f 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -52,7 +52,7 @@ done # If no mods are available for a specific game if [ -z "${compatiblemodslist}" ]; then - fn_print_fail "No mods are currently available for ${gamename}." + fn_print_fail_nl "No mods are currently available for ${gamename}." fn_script_log_info "No mods are currently available for ${gamename}." core_exit.sh fi From 688809a92d47441c4ea0588d8b977a935da7992b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:04:22 +0000 Subject: [PATCH 06/44] Improvements to boserver --- lgsm/functions/info_config.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 90c144d80a..9bc0b7e803 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -562,17 +562,14 @@ fn_info_config_ballistic_overkill(){ queryport="${zero}" maxplayers="${unavailable}" gamemode="${unavailable}" - gameworld="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*ServerName="//' | cut -f1 -d"\"") + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/^.*Password="//' | cut -f1 -d"\"") port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$((port + 1)) maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - + gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*GameMode="//' | cut -f1 -d"\"") # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -580,7 +577,6 @@ fn_info_config_ballistic_overkill(){ queryport=${queryport:-"0"} maxplayers=${maxplayers:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} fi } From 0513f60794499ccc359b0d6981330db4e008805b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:09:06 +0000 Subject: [PATCH 07/44] filter # --- lgsm/functions/info_config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 9bc0b7e803..1ba5752c16 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -563,13 +563,13 @@ fn_info_config_ballistic_overkill(){ maxplayers="${unavailable}" gamemode="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*ServerName="//' | cut -f1 -d"\"") - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/^.*Password="//' | cut -f1 -d"\"") + servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*ServerName="//' -e '/^#/d' | cut -f1 -d"\"") + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/^.*Password="//' -e '/^#/d' | cut -f1 -d"\"") port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$((port + 1)) maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*GameMode="//' | cut -f1 -d"\"") + gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*GameMode="//' -e '/^#/d' | cut -f1 -d"\"") # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} From 57b319d29eb61aeaf163b5c302978e12b949bcea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:17:49 +0000 Subject: [PATCH 08/44] boserver fixes --- lgsm/functions/info_config.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 1ba5752c16..9384f5aa13 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -561,22 +561,19 @@ fn_info_config_ballistic_overkill(){ port="${zero}" queryport="${zero}" maxplayers="${unavailable}" - gamemode="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*ServerName="//' -e '/^#/d' | cut -f1 -d"\"") - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/^.*Password="//' -e '/^#/d' | cut -f1 -d"\"") - port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$((port + 1)) + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*GameMode="//' -e '/^#/d' | cut -f1 -d"\"") # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} maxplayers=${maxplayers:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} fi } From a8ad9d5c74f0cba8eccf38ad7f244e661ae3285c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:24:48 +0000 Subject: [PATCH 09/44] amended config name --- BallisticOverkill/boserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BallisticOverkill/boserver b/BallisticOverkill/boserver index c17e02b6e5..7061a4e742 100755 --- a/BallisticOverkill/boserver +++ b/BallisticOverkill/boserver @@ -100,7 +100,7 @@ filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${filesdir}" executable="./BODS.x86" -servercfg="config.txt" +servercfg="${servicename}.txt" servercfgdefault="${servercfg}" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" From f1bb0dca1c98aac3064f67713cd4c0ec245a5346 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:24:58 +0000 Subject: [PATCH 10/44] Added Ballistic Overkill config --- lgsm/functions/install_config.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 44a251d3a5..210897fb8e 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -144,6 +144,12 @@ elif [ "${gamename}" == "ARMA 3" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Ballistic Overkill" ]; then + gamedirname="BladeSymphony" + array_configs+=( config.txt ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Battlefield: 1942" ]; then gamedirname="Battlefield1942" array_configs+=( serversettings.con ) From 7a74ec1e7a469530e7da7c15f41276674f08e1a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:29:37 +0000 Subject: [PATCH 11/44] corrected gamedirname for bo --- lgsm/functions/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 210897fb8e..ca56c2127c 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -145,7 +145,7 @@ elif [ "${gamename}" == "ARMA 3" ]; then fn_default_config_remote fn_set_config_vars elif [ "${gamename}" == "Ballistic Overkill" ]; then - gamedirname="BladeSymphony" + gamedirname="BallisticOverkill" array_configs+=( config.txt ) fn_fetch_default_config fn_default_config_remote From e80b46bd16ff57a0f22af7921872b80d3bb92147 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 20:48:28 +0000 Subject: [PATCH 12/44] removed . --- lgsm/functions/check_steamcmd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 25b73a70b6..0908cdcfa7 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -18,17 +18,17 @@ fn_install_steamcmd(){ fn_check_steamcmd_user(){ # Checks if steamuser is setup. if [ "${steamuser}" == "username" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}." + fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}" echo " * Change steamuser=\"username\" to a valid steam login." if [ -d "${scriptlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}." + fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" fi core_exit.sh fi # Anonymous user is set if steamuser is missing if [ -z "${steamuser}" ]; then if [ -d "${scriptlogdir}" ]; then - fn_script_log_info "Using anonymous Steam login." + fn_script_log_info "Using anonymous Steam login" fi steamuser="anonymous" steampass='' From 798d5c196427469acc2ca2d6f18a3de3c4a2b388 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 21:07:58 +0000 Subject: [PATCH 13/44] corrected defaultservercfg --- BallisticOverkill/boserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BallisticOverkill/boserver b/BallisticOverkill/boserver index 7061a4e742..28c39c1d66 100755 --- a/BallisticOverkill/boserver +++ b/BallisticOverkill/boserver @@ -101,7 +101,7 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./BODS.x86" servercfg="${servicename}.txt" -servercfgdefault="${servercfg}" +servercfgdefault="config.txt" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" From 59d4310ea803ce2967bc3bc586a5a6935a1dd3eb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 21:20:22 +0000 Subject: [PATCH 14/44] added ballistic overkill --- lgsm/functions/command_details.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index e34f657022..f37f964588 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -355,7 +355,7 @@ fn_details_ark(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then + if [ "${port}" -eq "${port}" ]; then echo -e "> RAW\tINBOUND\t$((port+1))\tudp" fi echo -e "> Query\tINBOUND\t${queryport}\tudp" @@ -363,6 +363,16 @@ fn_details_ark(){ } | column -s $'\t' -t } +fn_details_ballisticoverkill(){ + echo -e "netstat -atunp | grep BODS.x86" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/RCON\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_details_avalanche(){ echo -e "netstat -atunp | grep Jcmp-Server" echo -e "" @@ -539,7 +549,7 @@ fn_details_realvirtuality(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then + if [ "${port}" -eq "${port}" ]; then echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp" echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp" echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp" @@ -800,6 +810,8 @@ fn_display_details() { fn_details_sdtd elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_details_ark + elif [ "${gamename}" == "Ballistic Overkill" ]; then + fn_details_ballisticoverkill elif [ "${gamename}" == "Call of Duty" ]; then fn_details_cod elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then @@ -811,7 +823,7 @@ fn_display_details() { elif [ "${gamename}" == "Call of Duty: World at War" ]; then fn_details_codwaw elif [ "${gamename}" == "Factorio" ]; then - fn_details_factorio + fn_details_factorio elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld elif [ "${gamename}" == "QuakeWorld" ]; then @@ -825,7 +837,7 @@ fn_display_details() { elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 elif [ "${gamename}" == "Multi Theft Auto" ]; then - fn_details_mta + fn_details_mta elif [ "${gamename}" == "Mumble" ]; then fn_details_mumble elif [ "${gamename}" == "Rust" ]; then From 8ada4c4bf4b61ea13a5f25a8336f4afe921753c1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 21:22:02 +0000 Subject: [PATCH 15/44] added ballistic overkill --- lgsm/functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index f37f964588..99ed92b107 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -315,7 +315,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then From 11696acf5af0275847ed51f03f599ce9063b03ea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 22:13:22 +0000 Subject: [PATCH 16/44] Renamed LGSM to LinuxGSM For consistant branding. --- CONTRIBUTING.md | 8 ++++---- Hurtworld/hwserver | 2 +- images/logo/README.md | 2 +- lgsm/functions/alert.sh | 12 ++++++------ lgsm/functions/alert_email.sh | 2 +- lgsm/functions/alert_pushbullet.sh | 2 +- lgsm/functions/check.sh | 2 +- lgsm/functions/check_config.sh | 2 +- lgsm/functions/check_deps.sh | 8 ++++---- lgsm/functions/check_executable.sh | 2 +- lgsm/functions/check_glibc.sh | 2 +- lgsm/functions/check_ip.sh | 2 +- lgsm/functions/check_logs.sh | 2 +- lgsm/functions/check_permissions.sh | 2 +- lgsm/functions/check_root.sh | 2 +- lgsm/functions/check_status.sh | 4 ++-- lgsm/functions/check_steamcmd.sh | 2 +- lgsm/functions/check_system_dir.sh | 2 +- lgsm/functions/check_system_requirements.sh | 2 +- lgsm/functions/check_tmuxception.sh | 6 +++--- lgsm/functions/command_backup.sh | 2 +- lgsm/functions/command_console.sh | 2 +- lgsm/functions/command_debug.sh | 2 +- lgsm/functions/command_details.sh | 8 ++++---- lgsm/functions/command_dev_debug.sh | 2 +- lgsm/functions/command_dev_detect_deps.sh | 2 +- lgsm/functions/command_fastdl.sh | 2 +- lgsm/functions/command_install.sh | 2 +- lgsm/functions/command_install_resources_mta.sh | 2 +- lgsm/functions/command_mods_install.sh | 2 +- lgsm/functions/command_mods_remove.sh | 2 +- lgsm/functions/command_mods_update.sh | 2 +- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/command_postdetails.sh | 2 +- lgsm/functions/command_restart.sh | 2 +- lgsm/functions/command_start.sh | 2 +- lgsm/functions/command_stop.sh | 2 +- lgsm/functions/command_test_alert.sh | 2 +- lgsm/functions/command_ts3_server_pass.sh | 2 +- lgsm/functions/command_update.sh | 2 +- lgsm/functions/command_update_functions.sh | 6 +++--- lgsm/functions/command_validate.sh | 2 +- lgsm/functions/command_wipe.sh | 4 ++-- lgsm/functions/compress_unreal2_maps.sh | 2 +- lgsm/functions/compress_ut99_maps.sh | 2 +- lgsm/functions/core_dl.sh | 4 ++-- lgsm/functions/core_exit.sh | 4 ++-- lgsm/functions/core_functions.sh | 2 +- lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/core_messages.sh | 2 +- lgsm/functions/core_trap.sh | 2 +- lgsm/functions/fix.sh | 2 +- lgsm/functions/fix_arma3.sh | 2 +- lgsm/functions/fix_coduo.sh | 2 +- lgsm/functions/fix_csgo.sh | 2 +- lgsm/functions/fix_dst.sh | 2 +- lgsm/functions/fix_ges.sh | 2 +- lgsm/functions/fix_glibc.sh | 2 +- lgsm/functions/fix_ins.sh | 2 +- lgsm/functions/fix_kf.sh | 2 +- lgsm/functions/fix_mta.sh | 2 +- lgsm/functions/fix_ro.sh | 2 +- lgsm/functions/fix_rust.sh | 2 +- lgsm/functions/fix_steamcmd.sh | 2 +- lgsm/functions/fix_ut.sh | 2 +- lgsm/functions/fix_ut2k4.sh | 2 +- lgsm/functions/fn_functions | 2 +- lgsm/functions/fn_getopt | 2 +- lgsm/functions/fn_update_functions | 2 +- lgsm/functions/info_config.sh | 4 ++-- lgsm/functions/info_distro.sh | 8 ++++---- lgsm/functions/info_glibc.sh | 2 +- lgsm/functions/info_parms.sh | 2 +- lgsm/functions/install_complete.sh | 2 +- lgsm/functions/install_config.sh | 2 +- lgsm/functions/install_dst_token.sh | 4 ++-- lgsm/functions/install_factorio_save.sh | 2 +- lgsm/functions/install_gslt.sh | 2 +- lgsm/functions/install_header.sh | 2 +- lgsm/functions/install_logs.sh | 2 +- lgsm/functions/install_minecraft_eula.sh | 2 +- lgsm/functions/install_mta_resources.sh | 2 +- lgsm/functions/install_retry.sh | 2 +- lgsm/functions/install_server_dir.sh | 2 +- lgsm/functions/install_server_files.sh | 2 +- lgsm/functions/install_steamcmd.sh | 2 +- lgsm/functions/install_ts3db.sh | 2 +- lgsm/functions/install_unreal_tournament_eula.sh | 2 +- lgsm/functions/install_ut2k4_key.sh | 2 +- lgsm/functions/logs.sh | 2 +- lgsm/functions/mods_core.sh | 2 +- lgsm/functions/mods_list.sh | 6 +++--- lgsm/functions/monitor_gsquery.sh | 2 +- lgsm/functions/update_factorio.sh | 2 +- lgsm/functions/update_minecraft.sh | 2 +- lgsm/functions/update_mta.sh | 2 +- lgsm/functions/update_mumble.sh | 2 +- lgsm/functions/update_steamcmd.sh | 2 +- lgsm/functions/update_ts3.sh | 2 +- 99 files changed, 128 insertions(+), 128 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a90acec997..fbbbb04308 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,11 +9,11 @@ Before working on a project we recommend that you create a issue in regards to t Here are some important resources: * [Issues Page](https://github.com/GameServerManagers/LinuxGSM/issues) provides a list of areas that could use some work, - * [Developing LGSM](https://github.com/GameServerManagers/LinuxGSM/wiki/Developing-LGSM) gives a detailed guide on developing LGSM, - * [LGSM Exit Codes](https://github.com/GameServerManagers/LinuxGSM/wiki/LGSM-Exit-Codes) describes and gives an explanation for exit codes, + * [Developing LinuxGSM](https://github.com/GameServerManagers/LinuxGSM/wiki/Developing-LGSM) gives a detailed guide on developing LGSM, + * [LinuxGSM Exit Codes](https://github.com/GameServerManagers/LinuxGSM/wiki/LGSM-Exit-Codes) describes and gives an explanation for exit codes, * [gsquery](https://github.com/GameServerManagers/LinuxGSM/wiki/gsquery.py) describes the uses of the gsquery.py file, and * [Branching](https://github.com/GameServerManagers/LinuxGSM/wiki/Branching) is our final guide to submitting changes. - + ## Testing Please make sure all the code you write is working properly **before** you create a pull request. Information on debugging can be found in the following document: @@ -27,7 +27,7 @@ Please send a [GitHub Pull Request to LinuxGSM](https://github.com/GameServerMan Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: $ git commit -m "A brief summary of the commit - > + > > A paragraph describing what changed and its impact." This will help us in understanding your code and determining where problems may arise. diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 2730623070..2e1f7e45f8 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -23,7 +23,7 @@ version="170212" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -servername="Hurtworld LGSM Server" +servername="Hurtworld LinuxGSM Server" ip="0.0.0.0" port="12871" queryport="12881" diff --git a/images/logo/README.md b/images/logo/README.md index ef9c9c3f7d..4c3b9e790f 100644 --- a/images/logo/README.md +++ b/images/logo/README.md @@ -1,3 +1,3 @@ -# LGSM - Official Logos +# LinuxGSM - Official Logos For Reference the original design can be found here. http://twolofbees.com/artwork.php?iid=870 \ No newline at end of file diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 9cef86e95e..fb914a42f7 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert.sh function +# LinuxGSM alert.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing alerts. @@ -9,25 +9,25 @@ local commandaction="Alert" fn_alert_test(){ fn_script_log_info "Sending test alert" - alertsubject="LGSM - Test Alert - ${servername}" - alertbody="LGSM test alert, how you read?" + alertsubject="LinuxGSM - Test Alert - ${servername}" + alertbody="LinuxGSM test alert, how you read?" } fn_alert_restart(){ fn_script_log_info "Sending restart alert: ${executable} process not running" - alertsubject="LGSM - Restarted - ${servername}" + alertsubject="LinuxGSM - Restarted - ${servername}" alertbody="${servicename} ${executable} process not running" } fn_alert_restart_query(){ fn_script_log_info "Sending restart alert: ${gsquerycmd}" - alertsubject="LGSM - Restarted - ${servername}" + alertsubject="LinuxGSM - Restarted - ${servername}" alertbody="gsquery.py failed to query: ${gsquerycmd}" } fn_alert_update(){ fn_script_log_info "Sending update alert" - alertsubject="LGSM - Updated - ${servername}" + alertsubject="LinuxGSM - Updated - ${servername}" alertbody="${servicename} received update" } diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index 6b440070c1..a49dda3476 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert_email.sh function +# LinuxGSM alert_email.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends email alert including server details and logs. diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index aecf3d875a..05276b0104 100644 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM alert_pushbullet.sh function +# LinuxGSM alert_pushbullet.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends Pushbullet alert including the server status. diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index b48edf27ce..6d6c53101a 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check.sh function +# LinuxGSM check.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing checks. diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh index 72ea95c5c9..7b1ff92cfc 100644 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_config.sh function +# LinuxGSM check_config.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the server config is missing and warns the user if needed. diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index ea16e4b192..a159f858c0 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -1,8 +1,8 @@ #!/bin/bash -# LGSM check_deps.sh function +# LinuxGSM check_deps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Checks if required dependencies are installed for LGSM. +# Description: Checks if required dependencies are installed for LinuxGSM. local commandname="CHECK" @@ -144,7 +144,7 @@ if [ -n "$(command -v dpkg-query)" ]; then # Generate array of missing deps array_deps_missing=() - # LGSM requirements + # LinuxGSM requirements array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip ) # All servers except ts3 require tmux @@ -223,7 +223,7 @@ elif [ -n "$(command -v yum)" ]; then # Generate array of missing deps array_deps_missing=() - # LGSM requirements + # LinuxGSM requirements if [ "${distroversion}" == "6" ]; then array_deps_required=( curl wget util-linux-ng python file gzip bzip2 unzip ) else diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index 94e517cb56..14ccdb0602 100644 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_executable.sh function +# LinuxGSM check_executable.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if executable exists. diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh index a5e5c95a0a..f470589ab4 100644 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_glibc.sh function +# LinuxGSM check_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the server has the correct Glibc version or a fix available. diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 8141c534e4..5ae6392377 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_ip.sh function +# LinuxGSM check_ip.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Automatically identifies the server interface IP. diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 5bd69bb0f4..5e9da586c0 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_logs.sh function +# LinuxGSM check_logs.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if log files exist. diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index defde57719..840cc98649 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_permissions.sh +# LinuxGSM check_permissions.sh # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index 70067f5e5e..a71c993d29 100644 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_root.sh function +# LinuxGSM check_root.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if the user tried to run the script as root. diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 4a8a381b40..036bf72694 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_status.sh function +# LinuxGSM check_status.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -19,7 +19,7 @@ if [ "${gamename}" == "TeamSpeak 3" ]; then ts3error="${status}" status=0 fi - + elif [ "${gamename}" == "Mumble" ]; then # Get config info info_config.sh diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 0908cdcfa7..ddfcb82d4d 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_steamcmd.sh function +# LinuxGSM check_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if SteamCMD is installed correctly. diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index d06cbba05e..0e5c39718e 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_system_dir.sh function +# LinuxGSM check_system_dir.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Checks if systemdir is accessible. diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 92766785fc..56d1ffa3df 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_system_requirements.sh +# LinuxGSM check_system_requirements.sh # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 5b906f53ef..53f6febd5a 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM check_config.sh function +# LinuxGSM check_config.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -11,7 +11,7 @@ fn_check_is_in_tmux(){ if [ -n "${TMUX}" ];then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." - fn_print_information_nl "LGSM creates a tmux session when starting the server." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo "It is not possible to run a tmux session inside another tmux session" echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception" core_exit.sh @@ -21,7 +21,7 @@ fn_check_is_in_screen(){ if [ -n "${STY}" ];then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." - fn_print_information_nl "LGSM creates a tmux session when starting the server." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo "It is not possible to run a tmux session inside screen session" echo "https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux#tmuxception" core_exit.sh diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index b4bff70b0e..2ef072b0af 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_backup.sh function +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index ee9f13b6eb..bd712c51ea 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_console.sh function +# LinuxGSM command_console.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gives access to the server tmux console. diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 25e855c949..32cd88e9a5 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_debug.sh function +# LinuxGSM command_debug.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Runs the server without tmux and directly from the terminal. diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index bf843de2a6..debf5442d9 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_details.sh function +# LinuxGSM command_details.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -70,7 +70,7 @@ fn_details_disk(){ # Total: 15G # Used: 8.4G # Available: 5.7G - # LGSM Total: 1G + # LinuxGSM Total: 1G # Serverfiles: 961M # Backups: 2G @@ -82,7 +82,7 @@ fn_details_disk(){ echo -e "${blue}Total:\t${default}${totalspace}" echo -e "${blue}Used:\t${default}${usedspace}" echo -e "${blue}Available:\t${default}${availspace}" - echo -e "${blue}LGSM Total:\t${default}${rootdirdu}" + echo -e "${blue}LinuxGSM Total:\t${default}${rootdirdu}" echo -e "${blue}Serverfiles:\t${default}${filesdirdu}" if [ -d "${backupdir}" ]; then echo -e "${blue}Backups:\t${default}${backupdirdu}" @@ -692,7 +692,7 @@ fn_details_towerunite(){ echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\ttcp" # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then + if [ "${port}" -eq "${port}" ]; then echo -e "> Steam\tINBOUND\t$((port+1))\tudp" fi echo -e "> Query\tINBOUND\t${queryport}\tudp" diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index e17a8a7195..98d785994a 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_dev_debug.sh function +# LinuxGSM command_dev_debug.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 01c96ff477..f709a4603b 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_dev_detect_deps.sh function +# LinuxGSM command_dev_detect_deps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Detects dependencies the server binary requires. diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index c66834b984..8aaab29a1d 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_fastdl.sh function +# LinuxGSM command_fastdl.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index da3f516d98..7bbc40f429 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_install.sh function +# LinuxGSM command_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 678e412add..9dbcdb453f 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_install_resources_mta.sh function +# LinuxGSM command_install_resources_mta.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Installs the default resources for Multi Theft Auto. diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 4af7f8913f..b47a3d752f 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index d63a00101a..3b2c8a291e 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_uninstall.sh function +# LinuxGSM command_mods_uninstall.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index e933030167..81ac90fede 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_update.sh function +# LinuxGSM command_mods_update.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 7f247795f5..7bd259e30e 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_monitor.sh function +# LinuxGSM command_monitor.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 566d5c323e..b4169023a9 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_postdetails.sh function +# LinuxGSM command_postdetails.sh function # Author: CedarLUG # Contributor: CedarLUG # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index eacebaaea2..e0abc88edc 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_restart.sh function +# LinuxGSM command_restart.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Restarts the server. diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 30bbfccc8a..39dc363cf5 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_start.sh function +# LinuxGSM command_start.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 6ac9c188ec..8483e4669e 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_stop.sh function +# LinuxGSM command_stop.sh function # Author: Daniel Gibbs # Contributors: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 2f9749200a..a21deace51 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_test_alert.sh function +# LinuxGSM command_test_alert.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Sends a test alert. diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 1a98968898..193314bdab 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_ts3_server_pass.sh function +# LinuxGSM command_ts3_server_pass.sh function # Author: Daniel Gibbs # Contributor : UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 3b0176ca47..bc76a29b2a 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_update.sh function +# LinuxGSM command_update.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of servers. diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index e3d96d3789..34dbb81157 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LGSM command_update_functions.sh function +# LinuxGSM command_update_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -local commandname="UPDATE LGSM" -local commandaction="Update LGSM" +local commandname="UPDATE LinuxGSM" +local commandaction="Update LinuxGSM" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_print_dots "Updating functions" diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 3627acdb65..eb6d13c15f 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_validate.sh function +# LinuxGSM command_validate.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Runs a server validation. diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 440c8080e9..8b204614ff 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_backup.sh function +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -116,7 +116,7 @@ if [ "${gamename}" == "Rust" ]; then fn_script_log_info "User selects to erase any user, storage, log and map data from ${serveridentitydir}" sleep 1 fn_wipe_server_process - else + else fn_print_information_nl "No data to wipe was found" fn_script_log_info "No data to wipe was found." sleep 1 diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 67d3621e2c..e0c6b4eb39 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM compress_unreal2_maps.sh function +# LinuxGSM compress_unreal2_maps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 3ef6e140e1..a834e3e5bc 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM compress_ut99_maps.sh function +# LinuxGSM compress_ut99_maps.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index aad8f19635..d6c9b58cae 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LGSM core_dl.sh function +# LinuxGSM core_dl.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com -# Description: Deals with all downloads for LGSM. +# Description: Deals with all downloads for LinuxGSM. # fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 # filedir: location the file is to be saved: /home/server/lgsm/tmp diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index d5f17dfe50..02b471c788 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -1,8 +1,8 @@ #!/bin/bash -# LGSM core_exit.sh function +# LinuxGSM core_exit.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com -# Description: Handles exiting of LGSM by running and reporting an exit code. +# Description: Handles exiting of LinuxGSM by running and reporting an exit code. fn_exit_dev_debug(){ if [ -f "${rootdir}/.dev-debug" ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index c0be0b856e..1738928cae 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_functions.sh function +# LinuxGSM core_functions.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index db531ccb6e..bcecc6c2d4 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_getopt.sh function +# LinuxGSM core_getopt.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: getopt arguments. diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 540729af70..6a8f2f3576 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_messages.sh function +# LinuxGSM core_messages.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index 46615cfe55..253c8b4d27 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM core_trap.sh function +# LinuxGSM core_trap.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles CTRL-C trap to give an exit code. diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 5bac281a36..250709cca0 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix.sh function +# LinuxGSM fix.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Overall function for managing fixes. diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index e1bb4abcc6..6c65bf95f5 100644 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_arma3.sh function +# LinuxGSM fix_arma3.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves an issue with ARMA3. diff --git a/lgsm/functions/fix_coduo.sh b/lgsm/functions/fix_coduo.sh index 09835eadbb..a092acaba1 100644 --- a/lgsm/functions/fix_coduo.sh +++ b/lgsm/functions/fix_coduo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_coduo.sh function +# LinuxGSM fix_coduo.sh function # Author: Alexander Hurd # Website: https://gameservermanagers.com # Description: Fixes for Call of Duty: United Offensive diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index 38d169532d..305c0d06b6 100644 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_csgo.sh function +# LinuxGSM fix_csgo.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with CS:GO. diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index fea58b67ec..5a631a52e9 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_dst.sh function +# LinuxGSM fix_dst.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Don't Starve Together. diff --git a/lgsm/functions/fix_ges.sh b/lgsm/functions/fix_ges.sh index c8ee7ad5d1..f97ca767cd 100644 --- a/lgsm/functions/fix_ges.sh +++ b/lgsm/functions/fix_ges.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ges.sh function +# LinuxGSM fix_ges.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with GoldenEye: Source. diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index d03b2c41e5..a36b568acd 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_glibc.sh function +# LinuxGSM fix_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Downloads required Glibc files and applies the Glibc fix if required. diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index 2fab8f8aeb..c132173b0a 100644 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ins.sh function +# LinuxGSM fix_ins.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Insurgency. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index c08a343414..a70f8ce867 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_kf.sh function +# LinuxGSM fix_kf.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Killing Floor. diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index 7347201d9f..ebefc79d2c 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_mta.sh function +# LinuxGSM fix_mta.sh function # Author: Daniel Gibbs # Contributor: ChaosMTA # Website: https://gameservermanagers.com diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index ee28aaf4a8..3498ee9c85 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ro.sh function +# LinuxGSM fix_ro.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Red Orchestra. diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index ec0b125d40..13f7fbdb0b 100644 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_rust.sh function +# LinuxGSM fix_rust.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves startup issue with Rust diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 444409cfe5..79bf5acce6 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_steamcmd.sh function +# LinuxGSM fix_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues related to SteamCMD. diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh index 74233406fc..24dad6ee6f 100644 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ut.sh function +# LinuxGSM fix_ut.sh function # Author: Alexander Hurd # Website: https://gameservermanagers.com # Description: Resolves various issues with Unreal Tournament. diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 85b2334a7b..913ef62e9f 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fix_ut2k4.sh function +# LinuxGSM fix_ut2k4.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Resolves various issues with Unreal Tournament 2004. diff --git a/lgsm/functions/fn_functions b/lgsm/functions/fn_functions index 758af3dbc7..ca45dd740f 100644 --- a/lgsm/functions/fn_functions +++ b/lgsm/functions/fn_functions @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_functions function +# LinuxGSM fn_functions function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/fn_getopt b/lgsm/functions/fn_getopt index 0302cf1d5a..e15a292019 100644 --- a/lgsm/functions/fn_getopt +++ b/lgsm/functions/fn_getopt @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_getopt function +# LinuxGSM fn_getopt function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/fn_update_functions b/lgsm/functions/fn_update_functions index a424d33524..7dbde66943 100644 --- a/lgsm/functions/fn_update_functions +++ b/lgsm/functions/fn_update_functions @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM fn_update_functions function +# LinuxGSM fn_update_functions function # Author: Daniel Gibbs # Website: https://gameservermanagers.com lgsm_version="211016" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 5c5fdb98ed..9ce3ba242b 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_config.sh function +# LinuxGSM info_config.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com @@ -521,7 +521,7 @@ fn_info_config_towerunite(){ else servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - + # Not Set servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 16973cfc10..d8d733d640 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_distro.sh function +# LinuxGSM info_distro.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Variables providing useful info on the Operating System such as disk and performace info. @@ -88,19 +88,19 @@ totalspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $2}') usedspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $3}') availspace=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $4}') -## LGSM used space total. +## LinuxGSM used space total. rootdirdu=$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}') if [ -z "${rootdirdu}" ]; then rootdirdu="0M" fi -## LGSM used space in serverfiles dir. +## LinuxGSM used space in serverfiles dir. filesdirdu=$(du -sh "${filesdir}" 2> /dev/null | awk '{print $1}') if [ -z "${filesdirdu}" ]; then filesdirdu="0M" fi -## LGSM used space total minus backup dir. +## LinuxGSM used space total minus backup dir. rootdirduexbackup=$(du -sh --exclude="${backupdir}" "${filesdir}" 2> /dev/null | awk '{print $1}') if [ -z "${rootdirduexbackup}" ]; then rootdirduexbackup="0M" diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 5b821054d8..ce17c0c226 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_glibc.sh function +# LinuxGSM info_glibc.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Stores details on servers Glibc requirements. diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 72ef857c9b..17be983fdd 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM info_parms.sh function +# LinuxGSM info_parms.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets specific details from server parameters. diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 4a38d79b4c..d194e7a58b 100644 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_complete.sh function +# LinuxGSM install_complete.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Prints installation completion message and hints. diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 806550e9b9..529f87038d 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_config.sh function +# LinuxGSM install_config.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates default server configs. diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index 2e9713e718..0996e7e4e3 100644 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_dst_token.sh function +# LinuxGSM install_dst_token.sh function # Author: Daniel Gibbs & Marvin Lehmann (marvinl97) # Website: https://gameservermanagers.com # Description: Configures Don't Starve Together cluster with given token. @@ -29,7 +29,7 @@ if [ -z "${autoinstall}" ]; then * ) echo "Please answer yes or no.";; esac done - fi + fi if [ "${overwritetoken}" == "true" ]; then echo "Once you have the cluster token, enter it below" echo -n "Cluster Token: " diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index 353d57c205..e76e97e9fd 100644 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_factorio_save.sh function +# LinuxGSM install_factorio_save.sh function # Author: Kristian Polso # Website: https://gameservermanagers.com # Description: Creates the initial save file for Factorio diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index 1c8f251947..5f62539d7b 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_gslt.sh function +# LinuxGSM install_gslt.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Configures GSLT. diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index 499d1aec94..d830a94085 100644 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_header.sh function +# LinuxGSM install_header.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Prints installation header. diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index abad81329b..2019fdb138 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_logs.sh function +# LinuxGSM install_logs.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates log directories. diff --git a/lgsm/functions/install_minecraft_eula.sh b/lgsm/functions/install_minecraft_eula.sh index 410e283b4c..391c869f20 100644 --- a/lgsm/functions/install_minecraft_eula.sh +++ b/lgsm/functions/install_minecraft_eula.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_minecraft_eula.sh function +# LinuxGSM install_minecraft_eula.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets user to accept the EULA. diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index f4fff40107..8156da9da0 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_mta_resources.sh function +# LinuxGSM install_mta_resources.sh function # Author: Daniel Gibbs # Contributor: ChaosMTA # Website: https://gameservermanagers.com diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index d0ca16fef7..0212968e39 100644 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_retry.sh function +# LinuxGSM install_retry.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Asks for installation retry after failure. diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index d527b61933..d399570252 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_server_dir.sh function +# LinuxGSM install_server_dir.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Creates the server directory. diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index a988f2644e..335b0c6f58 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_server_files.sh function +# LinuxGSM install_server_files.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Installs server files. diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh index 82cce59a6b..26335c187c 100644 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_steamcmd.sh function +# LinuxGSM install_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Downloads SteamCMD on install. diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index bada12c0ba..1dbf16985b 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_ts3db.sh function +# LinuxGSM install_ts3db.sh function # Author: Daniel Gibbs # Contributor: PhilPhonic # Website: https://gameservermanagers.com diff --git a/lgsm/functions/install_unreal_tournament_eula.sh b/lgsm/functions/install_unreal_tournament_eula.sh index b39f9b2e29..442a108caa 100644 --- a/lgsm/functions/install_unreal_tournament_eula.sh +++ b/lgsm/functions/install_unreal_tournament_eula.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_unreal_tournament_eula.sh function +# LinuxGSM install_unreal_tournament_eula.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Gets user to accept the EULA. diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index b091faff34..b06cc12c30 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_ut2k4_key.sh function +# LinuxGSM install_ut2k4_key.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Activates ut2k4 server with given key. diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 32ad0deae5..ebcc8636a4 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM logs.sh function +# LinuxGSM logs.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 1e36285e13..620bfa921d 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 0be15b08b1..f5768efed2 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LGSM mods_list.sh function +# LinuxGSM mods_list.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com -# Description: Lists and defines available mods for LGSM supported servers; works along with mods_core.sh. +# Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh. # Usage: To add a mod, you need to add an array variable following the guide to set proper values; # Usage: Then add this array to the mods_global_array. # Usage: If needed, you can scrape the download URL first. @@ -43,7 +43,7 @@ modseparator="MOD" # [4] | "filename": the output filename # [5] | "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future) # [6] | "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it) -# [7] | "modinstalldir": the directory in which to install the mode ( use LGSM dir variables such as ${systemdir}) +# [7] | "modinstalldir": the directory in which to install the mode (use LGSM dir variables such as ${systemdir}) # [8] | "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" value to ignore the value or "NOUPDATE" to disallow updating; for files to keep upon uninstall, see fn_mod_tidy_files_list from mods_core.sh # [9] | "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value # [10] | "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index 2c8b2902b1..dc24aaee3f 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM monitor_gsquery.sh function +# LinuxGSM monitor_gsquery.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Uses gsquery.py to query the server port. diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index c3e16d802b..cbb39ef18a 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_factorio.sh function +# LinuxGSM update_factorio.sh function # Author: Daniel Gibbs # Contributor: Kristian Polso # Website: https://gameservermanagers.com diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 746ddfb2e5..cf45946b0d 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_minecraft.sh function +# LinuxGSM update_minecraft.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of Minecraft servers. diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index fff189ca70..0fcd7936c3 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_mta.sh function +# LinuxGSM update_mta.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of Multi Theft Auto servers. diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 6f5c35a889..b77cb3ac4f 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_mumble.sh function +# LinuxGSM update_mumble.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://gameservermanagers.com diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 6d2b6780a9..028f843ee3 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM update_steamcmd.sh function +# LinuxGSM update_steamcmd.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating using SteamCMD. diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index b5f4035972..f810eb0f46 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM command_ts3.sh function +# LinuxGSM command_ts3.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of teamspeak 3 servers. From 4376a540fcb4115b35070254337f9e3d03ed863c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 23:11:28 +0000 Subject: [PATCH 17/44] Added permissions alert an alert will go out if there is a permissions issue --- lgsm/functions/alert.sh | 14 +++++++++++--- lgsm/functions/check_permissions.sh | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index fb914a42f7..9fec833695 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -31,14 +31,22 @@ fn_alert_update(){ alertbody="${servicename} received update" } -if [ "${alert}" == "restart" ]; then +fn_alert_permissions(){ + fn_script_log_info "Sending permissions error alert" + alertsubject="LinuxGSM - Permissions Error - ${servername}" + alertbody="${servicename} has permissions issues." +} + +if [ "${alert}" == "permissions" ]; then + fn_alert_permissions +elif [ "${alert}" == "restart" ]; then fn_alert_restart elif [ "${alert}" == "restartquery" ]; then fn_alert_restart_query -elif [ "${alert}" == "update" ]; then - fn_alert_update elif [ "${alert}" == "test" ]; then fn_alert_test +elif [ "${alert}" == "update" ]; then + fn_alert_update fi if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 840cc98649..2a198d3c5d 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -43,8 +43,10 @@ fn_check_ownership(){ } | column -s $'\t' -t | tee -a "${scriptlog}" echo "" - fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" + fn_print_information_nl "please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" + alert="permissions" + alert.sh core_exit.sh fi } From aab6dc58bbd3cc3859a47b274caeab71c06b0677 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 23:21:55 +0000 Subject: [PATCH 18/44] fixed issue preventing monitor from running and alerting check_permissions is bypassed for monitor as the monitor woudl not work at all and not alert of a server failure. The server will however fail to start with permissions issues --- lgsm/functions/check.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 6d6c53101a..c8f659d2a7 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -12,7 +12,10 @@ local commandname="CHECK" check_root.sh check_tmuxception.sh -check_permissions.sh + +if [ "${function_selfname}" != "command_monitor.sh" ] + check_permissions.sh +fi if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]; then check_system_dir.sh From 4dc19ab64f442110589c768c8d3b25d8179599e0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 23:38:21 +0000 Subject: [PATCH 19/44] missing then --- lgsm/functions/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index c8f659d2a7..7cc1e9584e 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -13,7 +13,7 @@ local commandname="CHECK" check_root.sh check_tmuxception.sh -if [ "${function_selfname}" != "command_monitor.sh" ] +if [ "${function_selfname}" != "command_monitor.sh" ];then check_permissions.sh fi From 3cc0263c5426c68d17a7424dc02694cbdf2db7a6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2017 23:39:13 +0000 Subject: [PATCH 20/44] Permissions Error to error --- lgsm/functions/alert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 9fec833695..afcec526c8 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -33,7 +33,7 @@ fn_alert_update(){ fn_alert_permissions(){ fn_script_log_info "Sending permissions error alert" - alertsubject="LinuxGSM - Permissions Error - ${servername}" + alertsubject="LinuxGSM - Error - ${servername}" alertbody="${servicename} has permissions issues." } From c1579de5e8a0d713249403c3ec449ce7d9677da2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 00:09:20 +0000 Subject: [PATCH 21/44] Permissions alert will only happen during monitor Monitor needs to alert about permissions issues as the admin may not be around while this issue os occuring. --- lgsm/functions/check_permissions.sh | 23 ++++++++++++++++++++--- lgsm/functions/command_monitor.sh | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 2a198d3c5d..d7bff4dee0 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -6,7 +6,6 @@ # Description: Checks ownership & permissions of scripts, files and directories. local commandname="CHECK" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_check_ownership(){ if [ -f "${rootdir}/${selfname}" ]; then @@ -45,8 +44,10 @@ fn_check_ownership(){ echo "" fn_print_information_nl "please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-ownership-issues-found" - alert="permissions" - alert.sh + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi } @@ -62,6 +63,10 @@ fn_check_permissions(){ echo -e "File\n" find "${functionsdir}" -type f -not -executable -printf "%p\n" } | column -s $'\t' -t | tee -a "${scriptlog}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -80,6 +85,10 @@ fn_check_permissions(){ fn_script_log_info "The following directory does not have the correct permissions:" fn_script_log_info "${rootdir}" ls -l "${rootdir}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -120,6 +129,10 @@ fn_check_permissions(){ ls -l "${executabledir}/${execname}" fn_script_log_warn "The following file could not be set executable:" fn_script_log_info "${executabledir}/${execname}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh fi fi @@ -159,6 +172,10 @@ fn_sys_perm_fix_manually_msg(){ echo " chmod a+rx /sys /sys/class /sys/class/net" fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" sleep 1 + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi core_exit.sh } diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 7bd259e30e..0064ab439c 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -98,6 +98,7 @@ fn_monitor_tmux(){ fi } +monitorflag=1 fn_print_dots "${servername}" sleep 1 check.sh From 50efa1bd23310a5bd4c1b8572d8355a100381474 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 00:30:30 +0000 Subject: [PATCH 22/44] removed space --- lgsm/functions/core_messages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 565a1853e0..9fd87a8a91 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -277,9 +277,9 @@ fn_prompt_yn(){ if [ "${initial}" == "Y" ]; then prompt+=" [Y/n] " elif [ "${initial}" == "N" ]; then - prompt+=" [y/N] " + prompt+=" [y/N] " else - prompt+=" [y/n] " + prompt+=" [y/n] " fi while true; do From 06825f1e9c5b90ed3253388315c6e807c458ac18 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 00:36:30 +0000 Subject: [PATCH 23/44] missed a space --- lgsm/functions/core_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 9fd87a8a91..91f5bd75f7 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -275,7 +275,7 @@ fn_prompt_yn(){ local initial="$2" if [ "${initial}" == "Y" ]; then - prompt+=" [Y/n] " + prompt+=" [Y/n] " elif [ "${initial}" == "N" ]; then prompt+=" [y/N] " else From fd0f6f730dbc63d71e96a182011a327c0f717180 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 00:41:43 +0000 Subject: [PATCH 24/44] tabs --- lgsm/functions/core_messages.sh | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 91f5bd75f7..2e1286d7e9 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -271,25 +271,25 @@ fn_print_information_nl(){ # Y/N Prompt fn_prompt_yn(){ - local prompt="$1" - local initial="$2" - - if [ "${initial}" == "Y" ]; then - prompt+=" [Y/n] " - elif [ "${initial}" == "N" ]; then - prompt+=" [y/N] " - else - prompt+=" [y/n] " - fi - - while true; do - read -e -i "${initial}" -p "${prompt}" -r yn - case "${yn}" in - [Yy]|[Yy][Ee][Ss]) return 0 ;; - [Nn]|[Nn][Oo]) return 1 ;; - *) echo "Please answer yes or no." ;; - esac - done + local prompt="$1" + local initial="$2" + + if [ "${initial}" == "Y" ]; then + prompt+=" [Y/n] " + elif [ "${initial}" == "N" ]; then + prompt+=" [y/N] " + else + prompt+=" [y/n] " + fi + + while true; do + read -e -i "${initial}" -p "${prompt}" -r yn + case "${yn}" in + [Yy]|[Yy][Ee][Ss]) return 0 ;; + [Nn]|[Nn][Oo]) return 1 ;; + *) echo "Please answer yes or no." ;; + esac + done } # On-Screen End of Line From b30e49b8bf42df7cb280410696bc56505382aa2b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 01:06:50 +0000 Subject: [PATCH 25/44] Updated Teeworlds directorys --- Teeworlds/twserver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 60d8dc5fcc..2679bc45ec 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -99,8 +99,8 @@ tmpdir="${lgsmdir}/tmp" filesdir="${rootdir}/serverfiles" ## Server Specific Directories -systemdir="${filesdir}" -executabledir="${filesdir}" +systemdir="${filesdir}/tw" +executabledir="${systemdir}" executable="./teeworlds_srv" servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir servercfgdefault="server.cfg" From ddb607d5988b7b1f7387031bfdc0f5322c631077 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 01:59:56 +0000 Subject: [PATCH 26/44] increased Teeworlds glibc requirements --- lgsm/functions/info_glibc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index ce17c0c226..ad505eb0ec 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -81,7 +81,7 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" elif [ "${gamename}" == "Teeworlds" ]; then - glibcrequired="2.3" + glibcrequired="2.14" glibcfix="no" elif [ "${engine}" == "avalanche" ]; then glibcrequired="2.13" From 9f1c03da948652acf2ec1222e44860ad4dc90532 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 02:00:46 +0000 Subject: [PATCH 27/44] Imrprovements to graceful shutdown quake servers now also do graceful shutdown --- lgsm/functions/command_stop.sh | 106 ++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 8483e4669e..341ad4d95b 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -9,73 +9,83 @@ local commandname="STOP" local commandaction="Stopping" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -# Attempts graceful of source using rcon 'quit' command. -fn_stop_graceful_source(){ - fn_print_dots "Graceful: rcon quit" - fn_script_log_info "Graceful: rcon quit" +# Attempts graceful shutdown by sending the 'CTRL+c'. +fn_stop_graceful_ctrlc(){ + fn_print_dots "Graceful: CTRL+c" + fn_script_log_info "Graceful: CTRL+c" # sends quit - tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 + tmux send-keys C-c -t "${servicename}" > /dev/null 2>&1 # waits up to 30 seconds giving the server time to shutdown gracefuly for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: rcon quit: ${seconds}: " + fn_print_ok "Graceful: CTRL+c: ${seconds}: " fn_print_ok_eol_nl - fn_script_log_pass "Graceful: rcon quit: OK: ${seconds} seconds" + fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" break fi sleep 1 - fn_print_dots "Graceful: rcon quit: ${seconds}" + fn_print_dots "Graceful: CTRL+c: ${seconds}" done check_status.sh if [ "${status}" != "0" ]; then - fn_print_error "Graceful: rcon quit: " + fn_print_error "Graceful: CTRL+c: " fn_print_fail_eol_nl - fn_script_log_error "Graceful: rcon quit: FAIL" + fn_script_log_error "Graceful: CTRL+c: FAIL" fi sleep 1 fn_stop_tmux } -# Attempts graceful of goldsource using rcon 'quit' command. -# Goldsource 'quit' command restarts rather than shutsdown -# this function will only wait 3 seconds then force a tmux shutdown. -# preventing the server from coming back online. -fn_stop_graceful_goldsource(){ - fn_print_dots "Graceful: rcon quit" - fn_script_log_info "Graceful: rcon quit" +# Attempts graceful shutdown by sending the 'quit' command. +fn_stop_graceful_quit(){ + fn_print_dots "Graceful: sending \"quit\"" + fn_script_log_info "Graceful: sending \"quit\"" # sends quit tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 - # waits 3 seconds as goldsource servers restart with the quit command - for seconds in {1..3}; do + # waits up to 30 seconds giving the server time to shutdown gracefuly + for seconds in {1..30}; do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: sending \"quit\": ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" + break + fi sleep 1 - fn_print_dots "Graceful: rcon quit: ${seconds}" + fn_print_dots "Graceful: sending \"quit\": ${seconds}" done - fn_print_ok "Graceful: rcon quit: ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: rcon quit: OK: ${seconds} seconds" + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: sending \"quit\": " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: sending \"quit\": FAIL" + fi sleep 1 fn_stop_tmux } -fn_stop_graceful_ctrlc(){ - fn_print_dots "Graceful: console CTRL+c" - fn_script_log_info "Graceful: console CTRL+c" +# Attempts graceful of goldsource using rcon 'quit' command. +# Goldsource 'quit' command restarts rather than shutdown +# this function will only wait 3 seconds then force a tmux shutdown. +# preventing the server from coming back online. +fn_stop_graceful_goldsource(){ + fn_print_dots "Graceful: sending \"quit\"" + fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux send-keys C-c -t "${servicename}" > /dev/null 2>&1 + tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 # waits 3 seconds as goldsource servers restart with the quit command for seconds in {1..3}; do sleep 1 - fn_print_dots "Graceful: console CTRL+c: ${seconds}" + fn_print_dots "Graceful: sending \"quit\": ${seconds}" done - fn_print_ok "Graceful: console CTRL+c: ${seconds}: " + fn_print_ok "Graceful: sending \"quit\": ${seconds}: " fn_print_ok_eol_nl - fn_script_log_pass "Graceful: console CTRL+c: OK: ${seconds} seconds" + fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" sleep 1 fn_stop_tmux } - # Attempts graceful of 7 Days To Die using telnet. fn_stop_telnet_sdtd(){ sdtd_telnet_shutdown=$( expect -c ' @@ -135,7 +145,7 @@ fn_stop_graceful_sdtd(){ break fi sleep 1 - fn_print_dots "Graceful: rcon quit: ${seconds}" + fn_print_dots "Graceful: telnet: ${seconds}" done # If telnet failed will go straight to tmux shutdown. # If cannot shutdown correctly world save may be lost @@ -164,27 +174,27 @@ fn_stop_graceful_sdtd(){ # Attempts graceful of source using rcon 'stop' command. fn_stop_graceful_minecraft(){ - fn_print_dots "Graceful: console stop" - fn_script_log_info "Graceful: console stop" + fn_print_dots "Graceful: sending \"stop\"" + fn_script_log_info "Graceful: sending \"stop\"" # sends quit tmux send -t "${servicename}" stop ENTER > /dev/null 2>&1 # waits up to 30 seconds giving the server time to shutdown gracefuly for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: console stop: ${seconds}: " + fn_print_ok "Graceful: sending \"stop\": ${seconds}: " fn_print_ok_eol_nl - fn_script_log_pass "Graceful: console stop: OK: ${seconds} seconds" + fn_script_log_pass "Graceful: sending \"stop\": OK: ${seconds} seconds" break fi sleep 1 - fn_print_dots "Graceful: console stop: ${seconds}" + fn_print_dots "Graceful: sending \"stop\": ${seconds}" done check_status.sh if [ "${status}" != "0" ]; then - fn_print_error "Graceful: console stop: " + fn_print_error "Graceful: sending \"stop\": " fn_print_fail_eol_nl - fn_script_log_error "Graceful: console stop: FAIL" + fn_script_log_error "Graceful: sending \"stop\": FAIL" fi sleep 1 fn_stop_tmux @@ -192,27 +202,27 @@ fn_stop_graceful_minecraft(){ # Attempts graceful of mta using rcon 'quit' command. fn_stop_graceful_mta(){ - fn_print_dots "Graceful: console quit" - fn_script_log_info "Graceful: console quit" + fn_print_dots "Graceful: sending \"quit\"" + fn_script_log_info "Graceful: sending \"quit\"" # sends quit tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 # waits up to 120 seconds giving the server time to shutdown gracefuly, we need a long wait time here as resources are stopped individually and process their own shutdowns for seconds in {1..120}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: console quit: ${seconds}: " + fn_print_ok "Graceful: sending \"quit\": ${seconds}: " fn_print_ok_eol_nl - fn_script_log_pass "Graceful: console quit: OK: ${seconds} seconds" + fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" break fi sleep 1 - fn_print_dots "Graceful: console quit: ${seconds}" + fn_print_dots "Graceful: sending \"quit\": ${seconds}" done check_status.sh if [ "${status}" != "0" ]; then - fn_print_error "Graceful: console quit: " + fn_print_error "Graceful: sending \"quit\": " fn_print_fail_eol_nl - fn_script_log_error "Graceful: console quit: FAIL" + fn_script_log_error "Graceful: sending \"quit\": FAIL" fi sleep 1 fn_stop_tmux @@ -223,8 +233,8 @@ fn_stop_graceful_select(){ fn_stop_graceful_sdtd elif [ "${gamename}" == "Factorio" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]; then fn_stop_graceful_ctrlc - elif [ "${engine}" == "source" ]; then - fn_stop_graceful_source + elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]; then + fn_stop_graceful_quit elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource elif [ "${engine}" == "lwjgl2" ]; then From 92f748c1ca47cad2b120572c5d44402bc0c02af5 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 04:01:57 +0100 Subject: [PATCH 28/44] Rust now supports custom log dir --- Rust/rustserver | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Rust/rustserver b/Rust/rustserver index 9557f914df..513f6b9674 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -39,7 +39,7 @@ tickrate="30" # default 30; range : 15 to 100 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelogfile}" +parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" } # Specific to Rust @@ -132,7 +132,6 @@ backupdir="${rootdir}/backups" gamelogdir="${rootdir}/log/server" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" -gamelog="${gamelogdir}/${servicename}-game.log" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" @@ -140,7 +139,7 @@ emaillog="${scriptlogdir}/${servicename}-email.log" ## Logs Naming scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogfile="\"gamelog-$(date '+%Y-%m-%d-%H-%M-%S').log\"" +gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" ######################## ######## Script ######## From 9d603d10ceb6a264826dd2359aa0152e8c33ee44 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 04:35:46 +0100 Subject: [PATCH 29/44] only rotate logs if server is off Fixes #1318 --- lgsm/functions/logs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index ebcc8636a4..ac2c3d7717 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -16,7 +16,8 @@ if [ -n "${consolelog}" ]; then fi # For games not displaying a console, and having logs into their game directory -if [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then +check_status.sh +if [ "${status}" != "0" ] && [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then if [ -n "$(find "${systemdir}" -name "gamelog*.log")" ]; then fn_print_info "Moving game logs to ${gamelogdir}" fn_script_log_info "Moving game logs to ${gamelogdir}" From 7a4438e8d0cc56cea90f7c0cccb3cf1a6b6dd6fa Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 04:40:22 +0100 Subject: [PATCH 30/44] sys permission fix only upon server start fixes #1303 --- lgsm/functions/check_permissions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index d7bff4dee0..24648f2ec0 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -232,4 +232,6 @@ fn_sys_perm_error_process(){ ## Run checks fn_check_ownership fn_check_permissions -fn_sys_perm_error_process +if [ "${function_selfname}" == "command_start.sh" ]; then + fn_sys_perm_error_process +fi From 2b4262e1d5e83f71f64f20a4caf0414b175b4b5d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 04:55:16 +0100 Subject: [PATCH 31/44] Allow to run details with non-installed server fixes #1302 --- lgsm/functions/check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 7cc1e9584e..ec067de660 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -17,7 +17,7 @@ if [ "${function_selfname}" != "command_monitor.sh" ];then check_permissions.sh fi -if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]; then +if [ "${function_selfname}" != "command_install.sh" ]&&[ "${function_selfname}" != "command_update_functions.sh" ]&&[ "${function_selfname}" != "command_details.sh" ]&&[ "${function_selfname}" != "command_postdetails.sh" ]; then check_system_dir.sh fi @@ -53,7 +53,7 @@ do fi done -local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh ) +local allowed_commands_array=( command_console.sh command_debug.sh command_monitor.sh command_start.sh command_stop.sh ) for allowed_command in "${allowed_commands_array[@]}" do if [ "${allowed_command}" == "${function_selfname}" ]; then From 15f80f1151699c38f884f9335acb7139b4e8af52 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 05:21:16 +0100 Subject: [PATCH 32/44] Run log manager upon update fixes #1075 --- lgsm/functions/command_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index bc76a29b2a..ad7b76aaf4 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -11,7 +11,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_print_dots "" sleep 0.5 check.sh - +logs.sh if [ "${gamename}" == "TeamSpeak 3" ]; then update_ts3.sh From 14141d4c8a2421b13207abda74f8c44e701d192c Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 05:27:01 +0100 Subject: [PATCH 33/44] Case where there is no console log --- lgsm/functions/update_steamcmd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 028f843ee3..e500a0fbf3 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -98,7 +98,11 @@ fn_update_request_log(){ fn_print_dots "Checking for update: Server logs" fn_script_log_info "Checking for update: Server logs" sleep 1 - requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}") + if [ -f ${consolelog} ]; then + requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}") + else + requestrestart="0" + fi if [ "${requestrestart}" -ge "1" ]; then fn_print_ok_nl "Checking for update: Server logs: Update requested" fn_script_log_pass "Checking for update: Server logs: Update requested" From fadc79e84c1af3f0fec33a7a4b146c02cf5e3a71 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:18:25 +0100 Subject: [PATCH 34/44] Full path showed to the user fixes #1288 --- lgsm/functions/check_executable.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index 14ccdb0602..cc90b435dc 100644 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -9,9 +9,10 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" # Check if executable exists if [ ! -f "${executabledir}/${execname}" ]; then - fn_script_log_warn "Expected executable not found: ${executabledir}/${execname}" + fn_script_log_warn "Executable was not found: ${executabledir}/${execname}" if [ -d "${scriptlogdir}" ]; then - fn_print_fail_nl "Executable ${execname} was not found" + fn_print_fail_nl "Executable was not found:" + echo " * ${executabledir}/${execname}" fi exitcode="1" core_exit.sh From ab8ad9084c89c5871646b022d5fcf00a71aa8e7c Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:41:44 +0100 Subject: [PATCH 35/44] Only create dirs if they don't already exist --- lgsm/functions/install_logs.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 2019fdb138..0c3e69a4af 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,12 +15,22 @@ if [ "${checklogs}" != "1" ]; then fi sleep 1 # Create dir's for the script and console logs -mkdir -v "${rootdir}/log" -mkdir -v "${scriptlogdir}" -touch "${scriptlog}" +if [ ! -d "${rootdir}/log" ]; then + mkdir -v "${rootdir}/log" +fi +if [ ! -d "${scriptlogdir}" ]; then + mkdir -v "${scriptlogdir}" +fi +if [ ! -f "${scriptlog}" ]; then + touch "${scriptlog}" +fi if [ -n "${consolelogdir}" ]; then - mkdir -v "${consolelogdir}" - touch "${consolelog}" + if [ ! -d "${consolelogdir}" ]; then + mkdir -v "${consolelogdir}" + fi + if [ ! -f "${consolelog}" ]; then + touch "${consolelog}" + fi fi # If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs. @@ -32,7 +42,9 @@ fi # If a server is unreal2 or unity3d create a dir. if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then - mkdir -pv "${gamelogdir}" + if [ ! -d ${gamelogdir}" ]; then + mkdir -pv "${gamelogdir}" + fi fi # If server uses SteamCMD create a symbolic link to the Steam logs. @@ -42,4 +54,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then fi fi sleep 1 -fn_script_log_info "Logs installed" \ No newline at end of file +fn_script_log_info "Logs installed" From 6c6fd3a33c041fb35d24ae7f98f1feeeadf523b1 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:49:59 +0100 Subject: [PATCH 36/44] Create gamelogdir if variable exists & dir doesn't --- lgsm/functions/check_logs.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 5e9da586c0..d4fec4b1aa 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -7,11 +7,20 @@ local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -# Create directories for the script and console logs -if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then +fn_check_logs(){ fn_print_dots "Checking for log files" sleep 0.5 fn_print_info_nl "Checking for log files: Creating log files" checklogs=1 install_logs.sh +} + +# Create directories for the script and console logs +if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then + fn_check_logs +fi + +# Create gamelogdir if variable exist but dir doesn't exist +if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then + fn_check_logs fi From 84016558b8df2f5225c7bd4292a78c0a6b4f2e54 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:51:09 +0100 Subject: [PATCH 37/44] double quote missing --- lgsm/functions/install_logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 0c3e69a4af..3f6020e450 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -42,7 +42,7 @@ fi # If a server is unreal2 or unity3d create a dir. if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then - if [ ! -d ${gamelogdir}" ]; then + if [ ! -d "${gamelogdir}" ]; then mkdir -pv "${gamelogdir}" fi fi From 7edf379b81fc26406cb8766abc6174b16b5f0dbb Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 19 Feb 2017 06:56:19 +0100 Subject: [PATCH 38/44] Do not remove legacy logs if empty --- lgsm/functions/logs.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index ac2c3d7717..44467d82fa 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -101,10 +101,6 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}" legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l) find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - # Remove directory if empty - if [ ! "$(ls -A "${legacyserverlogdir}")" ]; then - rm -rf "${legacyserverlogdir}" - fi fi # Count total amount of files removed From 4155af5d60939f69ee6cfebcbae0dbe55ff22d52 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 12:42:02 +0000 Subject: [PATCH 39/44] Reverting commit, no requirement to bypass this. Rather than get no output mkdir message states that the directory already exists. This looks better than having nothing at all. --- lgsm/functions/install_logs.sh | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 3f6020e450..2019fdb138 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,22 +15,12 @@ if [ "${checklogs}" != "1" ]; then fi sleep 1 # Create dir's for the script and console logs -if [ ! -d "${rootdir}/log" ]; then - mkdir -v "${rootdir}/log" -fi -if [ ! -d "${scriptlogdir}" ]; then - mkdir -v "${scriptlogdir}" -fi -if [ ! -f "${scriptlog}" ]; then - touch "${scriptlog}" -fi +mkdir -v "${rootdir}/log" +mkdir -v "${scriptlogdir}" +touch "${scriptlog}" if [ -n "${consolelogdir}" ]; then - if [ ! -d "${consolelogdir}" ]; then - mkdir -v "${consolelogdir}" - fi - if [ ! -f "${consolelog}" ]; then - touch "${consolelog}" - fi + mkdir -v "${consolelogdir}" + touch "${consolelog}" fi # If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs. @@ -42,9 +32,7 @@ fi # If a server is unreal2 or unity3d create a dir. if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then - if [ ! -d "${gamelogdir}" ]; then - mkdir -pv "${gamelogdir}" - fi + mkdir -pv "${gamelogdir}" fi # If server uses SteamCMD create a symbolic link to the Steam logs. @@ -54,4 +42,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then fi fi sleep 1 -fn_script_log_info "Logs installed" +fn_script_log_info "Logs installed" \ No newline at end of file From 70922d953a2d3cc36c3bb7c31f3275b884de4802 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 12:44:54 +0000 Subject: [PATCH 40/44] comment --- lgsm/functions/check_logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index d4fec4b1aa..bc4f13bdfd 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -20,7 +20,7 @@ if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != " fn_check_logs fi -# Create gamelogdir if variable exist but dir doesn't exist +# Create gamelogdir if variable exist but dir does not exist if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then fn_check_logs fi From 1520fea4212beee36e36eca0dca4ba6e2aa51cf6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 16:15:02 +0000 Subject: [PATCH 41/44] Parms have been removed as uses the config file for settings --- QuakeLive/qlserver | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index ac5f4ab398..4e88012f41 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -24,19 +24,12 @@ version="170212" ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters arch="x64" # x64 or x86 -port="27960" -rconport="28960" -rconpassword="CHANGE_ME" -statsport="${port}" -statspassword="CHANGE_ME" -mappool='mappool.txt' -ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters # Edit with care | Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946 # Console Commands : http://www.regurge.at/ql/ fn_parms(){ -parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir}/${port} +set zmq_rcon_enable 1 +set zmq_rcon_port ${rconport} +set zmq_rcon_password ${rconpassword} +set zmq_stats_enable 1 +set zmq_stats_password ${statspassword} +set zmq_stats_port ${statsport} +set sv_mapPoolFile ${mappool} +exec ${servercfg}" +parms="+exec ${servercfg}" } #### LinuxGSM Settings #### From 90076ae2ba9b7b56ef0f5707ee43d11015e27921 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 17:18:12 +0000 Subject: [PATCH 42/44] New Release 170219 --- 7DaysToDie/sdtdserver | 2 +- ARKSurvivalEvolved/arkserver | 2 +- Arma3/arma3server | 2 +- Battlefield1942/bf1942server | 2 +- BlackMesa/bmdmserver | 2 +- BladeSymphony/bsserver | 2 +- BrainBread2/bb2server | 2 +- CallOfDuty/codserver | 2 +- CallOfDuty2/cod2server | 2 +- CallOfDuty4/cod4server | 2 +- CallOfDutyUnitedOffensive/coduoserver | 2 +- CallOfDutyWorldAtWar/codwawserver | 2 +- CodenameCURE/ccserver | 2 +- CounterStrike/csserver | 2 +- CounterStrikeConditionZero/csczserver | 2 +- CounterStrikeGlobalOffensive/csgoserver | 2 +- CounterStrikeSource/cssserver | 2 +- DayOfDefeat/dodserver | 2 +- DayOfDefeatSource/dodsserver | 2 +- DayOfInfamy/doiserver | 2 +- DeathmatchClassic/dmcserver | 2 +- DontStarveTogether/dstserver | 2 +- DoubleActionBoogaloo/dabserver | 2 +- EmpiresMod/emserver | 2 +- Factorio/fctrserver | 2 +- FistfulOfFrags/fofserver | 2 +- GarrysMod/gmodserver | 2 +- GoldenEyeSource/gesserver | 2 +- HalfLife2Deathmatch/hl2dmserver | 2 +- HalfLifeDeathmatch/hldmserver | 2 +- HalfLifeDeathmatchSource/hldmsserver | 2 +- Hurtworld/hwserver | 2 +- Insurgency/insserver | 2 +- JustCause2/jc2server | 2 +- KillingFloor/kfserver | 2 +- Left4Dead/l4dserver | 2 +- Left4Dead2/l4d2server | 2 +- Minecraft/mcserver | 2 +- MultiTheftAuto/mtaserver | 2 +- Mumble/mumbleserver | 2 +- NS2Combat/ns2cserver | 2 +- NaturalSelection2/ns2server | 2 +- NoMoreRoomInHell/nmrihserver | 2 +- OpposingForce/opforserver | 2 +- PiratesVikingandKnightsII/pvkiiserver | 2 +- ProjectZomboid/pzserver | 2 +- Quake2/q2server | 2 +- Quake3/q3server | 2 +- QuakeLive/qlserver | 2 +- QuakeWorld/qwserver | 2 +- RedOrchestra/roserver | 2 +- Ricochet/ricochetserver | 2 +- Rust/rustserver | 2 +- SeriousSam3BFE/ss3sserver | 2 +- Starbound/sbserver | 2 +- SvenCoop/svenserver | 2 +- TeamFortress2/tf2server | 2 +- TeamFortressClassic/tfcserver | 2 +- TeamSpeak3/ts3server | 2 +- Teeworlds/twserver | 2 +- Terraria/terrariaserver | 2 +- TowerUnite/tuserver | 2 +- UnrealTournament/utserver | 2 +- UnrealTournament2004/ut2k4server | 2 +- UnrealTournament3/ut3server | 2 +- UnrealTournament99/ut99server | 2 +- WolfensteinEnemyTerritory/wetserver | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_ts3server.sh | 2 +- 69 files changed, 69 insertions(+), 69 deletions(-) diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 0ab687af95..ce73f795cf 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index d47590b774..a633d728ca 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Arma3/arma3server b/Arma3/arma3server index 74b5532b6a..928b2a144c 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 7e21c0fbc1..3111d79d60 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 05d93a735a..a3e1e9454b 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 6a486a16e8..b0eb68e9b6 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 72700d7e32..0f5cb40d21 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver index c9fd27ae14..788db38382 100755 --- a/CallOfDuty/codserver +++ b/CallOfDuty/codserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server index 61eac16a73..21481bef6e 100755 --- a/CallOfDuty2/cod2server +++ b/CallOfDuty2/cod2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CallOfDuty4/cod4server b/CallOfDuty4/cod4server index 4c9e3c48ae..4c0c79a655 100644 --- a/CallOfDuty4/cod4server +++ b/CallOfDuty4/cod4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver index 1006c9aaf4..bc6b8eaf77 100755 --- a/CallOfDutyUnitedOffensive/coduoserver +++ b/CallOfDutyUnitedOffensive/coduoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CallOfDutyWorldAtWar/codwawserver b/CallOfDutyWorldAtWar/codwawserver index 1af43280ee..a8a9204cba 100755 --- a/CallOfDutyWorldAtWar/codwawserver +++ b/CallOfDutyWorldAtWar/codwawserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index aa72337126..7220ec4d87 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 72eb9bb2a0..21a61c5401 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index ff72163e80..4047c91289 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index c630e9888a..f3954640cc 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 2a8a0b8050..af7191cc9e 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index cae5ce0e1c..e58597264a 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 4fcca9610e..9a00097545 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index 0ea17b5699..27de57e53f 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index 17e96aa9cd..bd7540d3c7 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index ec0e5a12b7..84db9996fc 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index d803cacfae..4bbb6795ce 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index 9f9771d570..9294053689 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Factorio/fctrserver b/Factorio/fctrserver index f92db7e478..890562fa97 100644 --- a/Factorio/fctrserver +++ b/Factorio/fctrserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index ee2ec15c0c..064b1504a6 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index d48af2545c..70c535bfd7 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 20c639879e..0e3f44e64b 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index adb1e18e2d..a1830b9e7a 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 4c007e7387..be1fa33eee 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index 68c4b1904b..efec28f284 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index 2e1f7e45f8..d43cf41140 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Insurgency/insserver b/Insurgency/insserver index 5778bf628c..568da1b1f2 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 077595ecf8..db5974e425 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 5e32707a17..da9de5d3cb 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index d9a755c652..325ee5af91 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index ac3fa7edf2..9097ee97b8 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Minecraft/mcserver b/Minecraft/mcserver index 9ebf44f4ad..49bed4183f 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/MultiTheftAuto/mtaserver b/MultiTheftAuto/mtaserver index 1132e0cc94..74111e97c6 100644 --- a/MultiTheftAuto/mtaserver +++ b/MultiTheftAuto/mtaserver @@ -12,7 +12,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index b27f06ba5b..d66ec7d851 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index b7014072f5..04c73b2eda 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 6f6b0cfd20..b718a8180a 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 92f39d795f..5a3318e3e4 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 17ce539fbd..0b113a03d9 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index e909137d33..51c0fc434e 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 3339ac2d62..92c02a44ca 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Quake2/q2server b/Quake2/q2server index 9ebc1163e3..ff20eaa741 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Quake3/q3server b/Quake3/q3server index b959e7a206..b39697eef0 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 4e88012f41..b2ae067f49 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/QuakeWorld/qwserver b/QuakeWorld/qwserver index 081c5a81a0..147d65127b 100644 --- a/QuakeWorld/qwserver +++ b/QuakeWorld/qwserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index f7b883560b..1c7fac3671 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 2cfc3b93f3..2a714cc5de 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Rust/rustserver b/Rust/rustserver index 513f6b9674..05355eb8c3 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index 8c1b31ebd9..c3db06006b 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Starbound/sbserver b/Starbound/sbserver index c0d59f47ee..6672a4f85d 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index b320e8812e..17348c8a9f 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 313a63c3a9..6a54610902 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index ed3d306628..caabf8bf86 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index e28b52d2e3..0cae571ca6 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Teeworlds/twserver b/Teeworlds/twserver index 2679bc45ec..377c70088d 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 5c5b7839c7..43abf5a97b 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/TowerUnite/tuserver b/TowerUnite/tuserver index 5483eed93e..d25bd924ed 100644 --- a/TowerUnite/tuserver +++ b/TowerUnite/tuserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver index 037948bfe7..2982a1d7d4 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index ae270fbb78..b5aae27ffe 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index f03d2c9a46..4ad601283c 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index 4891a9cba1..002b0efe9f 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index 29d4f889ce..9720fcd988 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index e74fdb6c97..aa63621685 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -17,7 +17,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 8a573e048e..0b62e3668b 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="170212" +version="170219" ########################## ######## Settings ######## From 57a40b9c88e826eceef084cf13dc39b78d71a27f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 17:27:50 +0000 Subject: [PATCH 43/44] formating --- TowerUnite/tuserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TowerUnite/tuserver b/TowerUnite/tuserver index d25bd924ed..500ec01ffb 100644 --- a/TowerUnite/tuserver +++ b/TowerUnite/tuserver @@ -194,4 +194,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh +core_getopt.sh \ No newline at end of file From 261064738b4f6c0fcb65df9863d0dc44baeb32d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 17:28:28 +0000 Subject: [PATCH 44/44] Re added boserver error caused to to be renamed tuserver --- BallisticOverkill/boserver | 198 +++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 BallisticOverkill/boserver diff --git a/BallisticOverkill/boserver b/BallisticOverkill/boserver new file mode 100644 index 0000000000..6ab965bc3f --- /dev/null +++ b/BallisticOverkill/boserver @@ -0,0 +1,198 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs +# Purpose: Ballistic Overkill | Server Management Script +# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors +# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki +# Website: https://gameservermanagers.com + +# Debugging +if [ -f ".dev-debug" ]; then + exec 5>dev-debug.log + BASH_XTRACEFD="5" + set -x +fi + +version="170219" + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## Optional: Game Server Login Token +# GSLT can be used for running a public server. +# More info: https://gameservermanagers.com/gslt +gslt="" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms=" -batchmode -nographics -logFile output.txt" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## SteamCMD Settings +# Server appid +appid="416880" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Ballistic Overkill" +engine="unity" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="bo-server" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}" +executable="./BODS.x86" +servercfg="${servicename}.txt" +servercfgdefault="config.txt" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directorie +gamelogdir="${systemdir}/logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## + +# Fetches core_dl for file downloads +fn_fetch_core_dl(){ +github_file_url_dir="lgsm/functions" +github_file_url_name="${functionfile}" +filedir="${functionsdir}" +filename="${github_file_url_name}" +githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" +# If the file is missing, then download +if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" + fi + echo -e " fetching ${filename}...\c" + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curlfetch}" + echo -e "${githuburl}\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit 1 + fi + chmod +x "${filedir}/${filename}" +fi +source "${filedir}/${filename}" +} + +core_dl.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +core_functions.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh \ No newline at end of file