Skip to content

Add helper for image uploads while daemon is running#91

Open
leonardoman9 wants to merge 1 commit into
strodgers:mainfrom
leonardoman9:systemd-upload-image-helper
Open

Add helper for image uploads while daemon is running#91
leonardoman9 wants to merge 1 commit into
strodgers:mainfrom
leonardoman9:systemd-upload-image-helper

Conversation

@leonardoman9

Copy link
Copy Markdown

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.png

By default it uses:

  • service: epomaker-controller.service
  • command: epomakercontroller

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants