From 2ce3f5bf9494cec6f041a38f5245fa844d740d83 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Sat, 16 May 2015 01:49:40 -0700 Subject: [PATCH 01/10] Update fn_install_serverfiles --- functions/fn_install_serverfiles | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions/fn_install_serverfiles b/functions/fn_install_serverfiles index 2d28c438b..e839750bc 100644 --- a/functions/fn_install_serverfiles +++ b/functions/fn_install_serverfiles @@ -5,12 +5,7 @@ # Version: 050515 fn_steaminstallcommand(){ -if [ -z "${steamuser}" ]; then - fn_printwarningnl "SteamCMD user variable is not assigned in the main script! Resorting to anonymous login" - steamuser="anonymous" - steampass="" -fi - +fn_check_steamuser counter="0" while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .fn_install_serverfiles.tmp)" -ge "1" ]; do counter=$((counter+1)) From 82ec8d1618c03275d734fc50651c80882566268e Mon Sep 17 00:00:00 2001 From: Scarsz Date: Sat, 16 May 2015 01:51:30 -0700 Subject: [PATCH 02/10] Update fn_update_dl --- functions/fn_update_dl | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/fn_update_dl b/functions/fn_update_dl index d9d996035..c873a1e10 100644 --- a/functions/fn_update_dl +++ b/functions/fn_update_dl @@ -15,6 +15,7 @@ fn_details_config fn_printdots "Updating ${servername}" sleep 1 fn_check_steamcmd +fn_check_steamuser fn_printoknl "Updating ${servername}" fn_scriptlog "Updating ${servername}" sleep 1 From 8146c562f9cf6918551bb716448d63e9240a1986 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Sat, 16 May 2015 01:52:45 -0700 Subject: [PATCH 03/10] Update fn_validate --- functions/fn_validate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/fn_validate b/functions/fn_validate index 1c928f650..80f860ed1 100644 --- a/functions/fn_validate +++ b/functions/fn_validate @@ -23,8 +23,10 @@ sleep 1 cd "${rootdir}" cd "steamcmd" +fn_check_steamuser + if [ $(command -v unbuffer) ]; then - unbuffer=unbuffer + unbuffer=unbuffer fi ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}" From 4d8700f915af33f1d71ba991416e86f284bd02d5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 16 May 2015 10:31:35 +0100 Subject: [PATCH 04/10] Added fn_check_steamuser --- functions/fn_functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions/fn_functions b/functions/fn_functions index f43b0a867..fa1fb76a3 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -2,7 +2,7 @@ # LGSM fn_functions function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 110415 +# Version: 160515 # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. @@ -32,6 +32,11 @@ functionfile="${FUNCNAME}" fn_runfunction } +fn_check_steamuser(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + fn_check_systemdir(){ functionfile="${FUNCNAME}" fn_runfunction From a9a76c98df7828f7ed9a60e1f1549488b96597fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 17:36:35 +0100 Subject: [PATCH 05/10] now checks if steamuser is set to username * Now checks if the username has not been changed and warns * Altered warning message --- functions/fn_check_steamuser | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/functions/fn_check_steamuser b/functions/fn_check_steamuser index 29a3d72c4..1ca9553c7 100644 --- a/functions/fn_check_steamuser +++ b/functions/fn_check_steamuser @@ -1,11 +1,17 @@ #!/bin/bash -# LGSM fn_install_serverfiles function +# LGSM fn_check_steamuser function # Author: Daniel Gibbs # Website: http://gameservermanagers.com # Version: 160515 -if [ -z "${steamuser}" ]; then - fn_printwarningnl "SteamCMD user variable is not assigned in the main script! Resorting to anonymous login" - steamuser="anonymous" - steampass="" +if [ -z "${steamuser}" ]||[ "${steamuser}" == "username" ];; then + fn_printwarningnl "Steam Login not set. Using anonymous login." + fn_scriptlog "Steam Login not set. Using anonymous login." + if [ "${steamuser}" == "username" ]; then + echo " * Change steamuser=\"username\" to a valid steam login." + fn_scriptlog "Change steamuser=\"username\" to a valid steam login." + fi + steamuser="anonymous" + steampass="" + sleep 2 fi From f1a0d244130694b4cfd8d03eb5203f181f5a7158 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 17:37:48 +0100 Subject: [PATCH 06/10] Updated date --- functions/fn_install_serverfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fn_install_serverfiles b/functions/fn_install_serverfiles index e839750bc..a13042b88 100644 --- a/functions/fn_install_serverfiles +++ b/functions/fn_install_serverfiles @@ -2,7 +2,7 @@ # LGSM fn_install_serverfiles function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 050515 +# Version: 190515 fn_steaminstallcommand(){ fn_check_steamuser From 0ddb5a9da214a161d01163c31e3d5bc0bc43714d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 17:39:01 +0100 Subject: [PATCH 07/10] Added SteamCMD and steamuser check --- functions/fn_check_steamuser | 2 +- functions/fn_validate | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/fn_check_steamuser b/functions/fn_check_steamuser index 1ca9553c7..315b48407 100644 --- a/functions/fn_check_steamuser +++ b/functions/fn_check_steamuser @@ -2,7 +2,7 @@ # LGSM fn_check_steamuser function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 160515 +# Version: 190515 if [ -z "${steamuser}" ]||[ "${steamuser}" == "username" ];; then fn_printwarningnl "Steam Login not set. Using anonymous login." diff --git a/functions/fn_validate b/functions/fn_validate index 80f860ed1..75864bdd4 100644 --- a/functions/fn_validate +++ b/functions/fn_validate @@ -2,7 +2,7 @@ # LGSM fn_validate function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 050515 +# Version: 190515 # Description: Runs a server validation. @@ -22,7 +22,7 @@ fn_scriptlog "Checking server files" sleep 1 cd "${rootdir}" cd "steamcmd" - +fn_check_steamcmd fn_check_steamuser if [ $(command -v unbuffer) ]; then From 4b967382842d836d8fe4a42a6c69d5dce41e8e61 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 17:39:41 +0100 Subject: [PATCH 08/10] Removed SteamCMD and Steamuser Not required in this file as fn_update_check covers it. --- functions/fn_update_dl | 2 -- 1 file changed, 2 deletions(-) diff --git a/functions/fn_update_dl b/functions/fn_update_dl index c873a1e10..de27a0e92 100644 --- a/functions/fn_update_dl +++ b/functions/fn_update_dl @@ -14,8 +14,6 @@ fn_check_systemdir fn_details_config fn_printdots "Updating ${servername}" sleep 1 -fn_check_steamcmd -fn_check_steamuser fn_printoknl "Updating ${servername}" fn_scriptlog "Updating ${servername}" sleep 1 From 434c3a802d20c6614c08c4b3d6a60227eda2dfa8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 17:40:14 +0100 Subject: [PATCH 09/10] Added SteamCMD and steamuser check --- functions/fn_update_check | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/fn_update_check b/functions/fn_update_check index 1a05e760b..0ff141e45 100644 --- a/functions/fn_update_check +++ b/functions/fn_update_check @@ -2,7 +2,7 @@ # LGSM fn_update_check function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 160515 +# Version: 190515 # Description: Checks if a server update is available. @@ -101,6 +101,8 @@ echo "" } fn_steamcmdcheck(){ +fn_check_steamcmd +fn_check_steamuser fn_appmanifestcheck # Checks for server update from SteamCMD fn_printdots "Checking for update: SteamCMD" From 100d03c9cb7769f76600c450f238830a594fba05 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2015 19:29:56 +0100 Subject: [PATCH 10/10] Added tab --- functions/fn_check_steamuser | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/fn_check_steamuser b/functions/fn_check_steamuser index 315b48407..d9043db17 100644 --- a/functions/fn_check_steamuser +++ b/functions/fn_check_steamuser @@ -8,8 +8,8 @@ if [ -z "${steamuser}" ]||[ "${steamuser}" == "username" ];; then fn_printwarningnl "Steam Login not set. Using anonymous login." fn_scriptlog "Steam Login not set. Using anonymous login." if [ "${steamuser}" == "username" ]; then - echo " * Change steamuser=\"username\" to a valid steam login." - fn_scriptlog "Change steamuser=\"username\" to a valid steam login." + echo " * Change steamuser=\"username\" to a valid steam login." + fn_scriptlog "Change steamuser=\"username\" to a valid steam login." fi steamuser="anonymous" steampass=""