Add helper for image uploads while daemon is running#91
Open
leonardoman9 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a small helper script for Linux/systemd users who run the controller daemon as a service.
When the daemon is running, uploading an image can leave the display in a state where CPU/temperature updates do
not resume visibly until the daemon is restarted. The helper stops the service, uploads the image, and restarts the
service only if it was active before.
Usage
The script should be run with permissions to stop/start the configured systemd service. For system services this
may require polkit authorization or running the helper with appropriate privileges.
service/epomaker-upload-image path/to/image.pngBy default it uses:
Both can be overridden:
EPOMAKER_SERVICE_NAME=my-epomaker.service EPOMAKER_CONTROLLER_BIN=/path/to/epomakercontroller service/epomaker-
upload-image path/to/image.png
Testing
python -m pytest tests/test_service_upload_helper.py
Result:
1 passed