File tree Expand file tree Collapse file tree 3 files changed +37
-29
lines changed
Expand file tree Collapse file tree 3 files changed +37
-29
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,16 @@ fn_print_dots ""
1414check.sh
1515core_logs.sh
1616
17- core_steamcmd.sh
17+ if [ " ${appid} " ]; then
18+ core_steamcmd.sh
1819
19- check_steamcmd.sh
20+ check_steamcmd.sh
2021
21- fn_update_steamcmd_localbuild
22- fn_update_steamcmd_remotebuild
23- fn_update_steamcmd_compare
22+ fn_update_steamcmd_localbuild
23+ fn_update_steamcmd_remotebuild
24+ fn_update_steamcmd_compare
25+ elif [ " ${shortname} " == " ts3" ]; then
26+ update_ts3.sh
27+ fi
2428
2529core_exit.sh
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then
7575fi
7676
7777# Validate and check-update command.
78- if [ " ${appid} " ]; then
78+ if [ " ${appid} " ]|| [ " ${shortname} " == " ts3 " ] ; then
7979 currentopt+=(" ${cmd_validate[@]} " " ${cmd_check_update[@]} " )
8080fi
8181
Original file line number Diff line number Diff line change @@ -150,35 +150,39 @@ fn_update_ts3_compare() {
150150 fn_script_log_info " Remote build: ${remotebuild} "
151151 fn_script_log_info " ${localbuild} > ${remotebuild} "
152152
153- unset updateonstart
154- check_status.sh
155- # If server stopped.
156- if [ " ${status} " == " 0" ]; then
157- exitbypass=1
158- fn_update_ts3_dl
159- if [ " ${requirerestart} " == " 1" ]; then
153+ if [ " ${commandname} " == " UPDATE" ]; then
154+ unset updateonstart
155+ check_status.sh
156+ # If server stopped.
157+ if [ " ${status} " == " 0" ]; then
160158 exitbypass=1
161- command_start.sh
162- fn_firstcommand_reset
159+ fn_update_ts3_dl
160+ if [ " ${requirerestart} " == " 1" ]; then
161+ exitbypass=1
162+ command_start.sh
163+ fn_firstcommand_reset
164+ exitbypass=1
165+ command_stop.sh
166+ fn_firstcommand_reset
167+ fi
168+ # If server started.
169+ else
170+ fn_print_restart_warning
163171 exitbypass=1
164172 command_stop.sh
165173 fn_firstcommand_reset
174+ exitbypass=1
175+ fn_update_ts3_dl
176+ exitbypass=1
177+ command_start.sh
178+ fn_firstcommand_reset
166179 fi
167- # If server started.
168- else
169- fn_print_restart_warning
170- exitbypass=1
171- command_stop.sh
172- fn_firstcommand_reset
173- exitbypass=1
174- fn_update_ts3_dl
175- exitbypass=1
176- command_start.sh
177- fn_firstcommand_reset
180+ unset exitbypass
181+ date +%s > " ${lockdir} /lastupdate.lock"
182+ alert=" update"
183+ elif [ " ${commandname} " == " CHECK-UPDATE" ]; then
184+ alert=" check-update"
178185 fi
179- unset exitbypass
180- date +%s > " ${lockdir} /lastupdate.lock"
181- alert=" update"
182186 alert.sh
183187 else
184188 fn_print_ok_nl " Checking for update: ${remotelocation} "
You can’t perform that action at this time.
0 commit comments