|
@@ -150,35 +150,39 @@ fn_update_ts3_compare() {
|
|
|
fn_script_log_info "Remote build: ${remotebuild}"
|
|
fn_script_log_info "Remote build: ${remotebuild}"
|
|
|
fn_script_log_info "${localbuild} > ${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
|
|
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
|
|
exitbypass=1
|
|
|
command_stop.sh
|
|
command_stop.sh
|
|
|
fn_firstcommand_reset
|
|
fn_firstcommand_reset
|
|
|
|
|
+ exitbypass=1
|
|
|
|
|
+ fn_update_ts3_dl
|
|
|
|
|
+ exitbypass=1
|
|
|
|
|
+ command_start.sh
|
|
|
|
|
+ fn_firstcommand_reset
|
|
|
fi
|
|
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
|
|
fi
|
|
|
- unset exitbypass
|
|
|
|
|
- date +%s > "${lockdir}/lastupdate.lock"
|
|
|
|
|
- alert="update"
|
|
|
|
|
alert.sh
|
|
alert.sh
|
|
|
else
|
|
else
|
|
|
fn_print_ok_nl "Checking for update: ${remotelocation}"
|
|
fn_print_ok_nl "Checking for update: ${remotelocation}"
|