fix(update): continue starting the server after updateonstart applies an update (#5056)
With updateonstart enabled, command_start.sh sets exitbypass so that
command_update.sh returns to it. When an update was available and the
server was stopped, the update modules ran unset exitbypass after the
download, so the final core_exit.sh in command_update.sh exited the
whole script and the server was never started. This affected start and
restart for every update module, not just SteamCMD.
command_update.sh now records the caller's exitbypass on entry and
restores it before its final core_exit.sh, so a caller that asked to
continue always gets control back.
Tested on a test server (hl2dmserver, develop modules):
- start and restart with an update available: server now starts
(was left stopped with exit code 0 before the fix)
- start and restart with no update: server starts
- start and restart with a failed SteamCMD download: server starts on
the installed build
- update while running, while stopped, with no update and with a
failed download: unchanged behaviour
Fixes #4415
Fixes #4703