mirror of
https://github.com/Evidlo/remarkable_printer.git
synced 2024-10-19 19:17:37 -04:00
d1fe37662a
Previous to this commit, the printer needs to continuously run in the background, even if it doesn't do much most of the time, to keep the socket open and handle incoming connections. This commit hands over handling the open socket to systemd and the printer-code gets started by systemd only when there is something incoming on the socket. The printer itself then takes over the socket from systemd, handles the incoming data and exits afterwards, returning socket management to systemd again. This reduces running processes as well as the memory footprint of the running system.
10 lines
161 B
SYSTEMD
10 lines
161 B
SYSTEMD
[Unit]
|
|
Description=Socket for native printing to reMarkable
|
|
After=multi-user.target
|
|
|
|
[Socket]
|
|
ListenStream=10.11.99.1:9100
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|