Skip to content

[Bug]: failure during restart causes server to be stopped but not started back up #4278

@ddan39

Description

@ddan39

User story

If it is not going to run the start after the stop, then it shouldn't stop it, or if it does run stop it should always try its hardest to then start it back up.

Game

Project Zomboid

Linux distro

Debian 12

Command

command: restart

Further information

I think what's happening, but i'm not positive, is that command_restart.sh has an exitbypass=1 before command_stop.sh, so if you run into something like a permissions check like I did, it doesn't stop the command_stop.sh from running, but in core_exit.sh the exitbypass is unset after it is bypassed once, so for command_start.sh the permission check prevents it from running since exitbypass is now unset. It almost seems like the exitbypass was meant to be set before command_start.sh instead of command_stop.sh so that the stop runs then it would at least try to start the server even if there was some error.

Relevant log output

$ ~/pzserver restart
[ FAIL ] Stopping pzserver: Permissions issues found
Information! The following files are not executable:
File
/home/pztestserver/lgsm/modules/.check_permissions.sh.swp
[  OK  ] Stopping pzserver: Graceful: sending "quit": 8: OK

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    👀 In Review

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions