Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
AUTO_PAUSE_ENABLED=true
Choices
My implementation steps
knockd
resumed the PalServer and I was able to connect as is.player_logging.sh
, I decided to implement an automatic pause service inplayer_logging.sh
.is_safe_timing
command to enter the pause state at a safe timing.autopause resume
command so that you can resume manually./palworld/.skip-pause
file exists.I'm calling it from countdown_message and term_handler.
This also supports AUTO_UPDATE and AUTO_REBOOT.
/palworld/.paused
file indicates that the server is in a paused state.Deleting this file will resume the server.
You can also resume the server using the following command:
autopause resume [reason]
I recommend using this command, as it allows you to resume the server while leaving the reason in the log.
examples/docker-compose-autopause.yml
as an example.implementation for COMMINITY
api.palworldgames.com
on its behalf./home/steam/autopause/addons/PalIntercept.py
as an add-on for mitmproxy to capture only the data necessary for transmission./home/steam/autopause/
asregister.json
orupdate.json
.All I need to capture is the data that PalServer sends.
Originally, I think it would be desirable to embed custom header in the data to be sent on behalf of the user and then remove it using a proxy while forwarding it, but I have omitted this as it is not really necessary.
for Tester
-The tests directory has common.yml for sharing purposes. This file is referenced from tests/autopause/docker-compose.yml.
Test instructions
$ cd tests/autopause $ ./test-manually.sh
Checklist before requesting a review
It's been working fine for about two weeks, but since it's a major change, we still need to test it.
Running without root is unconfirmed.I have performed a self-review/test of my code
I've added documentation about this change to the docs.
I've not introduced breaking changes.
This is a risky feature addition, but it will have no effect unless you set AUTO_PAUSE_ENABLED=true.
My changes do not violate linting rules.