Browse Source

Update issue quick fix

A quick fix for the issue of server not updating correctly.
I have set the logupdaterequest to run before steamcmdcheck. This should
force the update to go though. I will be making some bug changes to the
updater in the future.
pull/322/head
Daniel Gibbs 10 years ago
parent
commit
b8312d1160
  1. 13
      functions/fn_update_check

13
functions/fn_update_check

@ -67,10 +67,10 @@ fi
fn_logupdaterequest(){ fn_logupdaterequest(){
# Checks for server update requests from server logs. # Checks for server update requests from server logs.
echo "" echo ""
fn_printdots "Checking server logs for update requests" fn_printdots "Checking for update: Server logs"
sleep 1 sleep 1
fn_printok "Checking server logs for update requests" fn_printok "Checking for update: Server logs"
fn_scriptlog "Checking server logs for update requests" fn_scriptlog "Checking for update: Server logs"
sleep 1 sleep 1
requestrestart=$(grep -sc "MasterRequestRestart" "${consolelog}") requestrestart=$(grep -sc "MasterRequestRestart" "${consolelog}")
if [ "${requestrestart}" -ge "1" ]; then if [ "${requestrestart}" -ge "1" ]; then
@ -92,14 +92,14 @@ if [ "${requestrestart}" -ge "1" ]; then
fn_start fn_start
fi fi
else else
fn_printok "No update request detected" fn_printok "Checking for update: Server logs: No update requested"
sleep 1 sleep 1
fi fi
echo "" echo ""
exit
} }
fn_steamcmdcheck(){ fn_steamcmdcheck(){
fn_appmanifestcheck
# Checks for server update from SteamCMD # Checks for server update from SteamCMD
fn_printdots "Checking for update: SteamCMD" fn_printdots "Checking for update: SteamCMD"
fn_scriptlog "Checking for update: SteamCMD" fn_scriptlog "Checking for update: SteamCMD"
@ -118,7 +118,6 @@ if [ -z "${availablebuild}" ]; then
fn_printfail "Checking for update: SteamCMD: Not returning version info" fn_printfail "Checking for update: SteamCMD: Not returning version info"
fn_scriptlog "Failure! Checking for update: SteamCMD: Not returning version info" fn_scriptlog "Failure! Checking for update: SteamCMD: Not returning version info"
sleep 2 sleep 2
fn_logupdaterequest
else else
fn_printok "Checking for update: SteamCMD" fn_printok "Checking for update: SteamCMD"
fn_scriptlog "Success! Checking for update: SteamCMD" fn_scriptlog "Success! Checking for update: SteamCMD"
@ -270,6 +269,6 @@ fn_printdots "Checking for update"
if [ "${gamename}" == "Teamspeak 3" ]; then if [ "${gamename}" == "Teamspeak 3" ]; then
fn_teamspeak3_check fn_teamspeak3_check
else else
fn_appmanifestcheck fn_logupdaterequest
fn_steamcmdcheck fn_steamcmdcheck
fi fi
Loading…
Cancel
Save