Skip to content

Changes for running as a (background) service - #27

Open
Kartoffel wants to merge 2 commits into
OliverF:masterfrom
Kartoffel:run_as_service
Open

Changes for running as a (background) service#27
Kartoffel wants to merge 2 commits into
OliverF:masterfrom
Kartoffel:run_as_service

Conversation

@Kartoffel

Copy link
Copy Markdown

By default, relay.py will wait for user input by reading from the terminal.
This breaks catastrophically when the process is not attached to a terminal, e.g. when started as a systemd unit (#17).

I've changed relay.py so that it waits for signals. This works both for keyboard events as well as detached from a terminal. Additionally, a sample systemd unit is provided.

@dattasaurabh82

Copy link
Copy Markdown

Yeah tried different variations of background service, doesn't work unfortunately.
It starts, Runs, then exits when run from systemd service.

Also when run normally from terminal, for the first time, if the MJPEG stream is DOWN (the link of whose id passed to the script when it was ran), doesn't persistently keep trying.

But if the Stream is UP, it connects, then if I kill the stream , it keeps persistently trying and when the link is UP again, it connect successfully.

Either way, impossible to run as a service.

Can this be solved?

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