Christian
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
37 additions and
29 deletions
-
lgsm/functions/command_check_update.sh
-
lgsm/functions/core_getopt.sh
-
lgsm/functions/update_ts3.sh
|
|
@ -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 |
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
@ -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}" |
|
|
|