Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions lgsm/functions/command_check_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ fn_print_dots ""
check.sh
core_logs.sh

core_steamcmd.sh
if [ "${appid}" ]; then
core_steamcmd.sh

check_steamcmd.sh
check_steamcmd.sh

fn_update_steamcmd_localbuild
fn_update_steamcmd_remotebuild
fn_update_steamcmd_compare
fn_update_steamcmd_localbuild
fn_update_steamcmd_remotebuild
fn_update_steamcmd_compare
elif [ "${shortname}" == "ts3" ]; then
update_ts3.sh
fi

core_exit.sh
2 changes: 1 addition & 1 deletion lgsm/functions/core_getopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then
fi

# Validate and check-update command.
if [ "${appid}" ]; then
if [ "${appid}" ]||[ "${shortname}" == "ts3" ]; then
currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}")
fi

Expand Down
50 changes: 27 additions & 23 deletions lgsm/functions/update_ts3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,35 +150,39 @@ fn_update_ts3_compare() {
fn_script_log_info "Remote build: ${remotebuild}"
fn_script_log_info "${localbuild} > ${remotebuild}"

unset updateonstart
check_status.sh
# If server stopped.
if [ "${status}" == "0" ]; then
exitbypass=1
fn_update_ts3_dl
if [ "${requirerestart}" == "1" ]; then
if [ "${commandname}" == "UPDATE" ]; then
unset updateonstart
check_status.sh
# If server stopped.
if [ "${status}" == "0" ]; then
exitbypass=1
command_start.sh
fn_firstcommand_reset
fn_update_ts3_dl
if [ "${requirerestart}" == "1" ]; then
exitbypass=1
command_start.sh
fn_firstcommand_reset
exitbypass=1
command_stop.sh
fn_firstcommand_reset
fi
# If server started.
else
fn_print_restart_warning
exitbypass=1
command_stop.sh
fn_firstcommand_reset
exitbypass=1
fn_update_ts3_dl
exitbypass=1
command_start.sh
fn_firstcommand_reset
fi
# If server started.
else
fn_print_restart_warning
exitbypass=1
command_stop.sh
fn_firstcommand_reset
exitbypass=1
fn_update_ts3_dl
exitbypass=1
command_start.sh
fn_firstcommand_reset
unset exitbypass
date +%s > "${lockdir}/lastupdate.lock"
alert="update"
elif [ "${commandname}" == "CHECK-UPDATE" ]; then
alert="check-update"
fi
unset exitbypass
date +%s > "${lockdir}/lastupdate.lock"
alert="update"
alert.sh
else
fn_print_ok_nl "Checking for update: ${remotelocation}"
Expand Down