remarkable_printer/install.sh
Jonas Große Sundrup d1fe37662a
socket-activate printer
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.
2020-12-29 14:30:30 +01:00

10 lines
330 B
Bash

mkdir -p /home/root/bin
cd /home/root/bin
wget -O release.zip http://github.com/evidlo/remarkable_printer/releases/latest/download/release.zip
unzip -o release.zip
mv printer.service /etc/systemd/system
mv printer.socket /etc/systemd/system
systemctl daemon-reload
systemctl enable --now printer.socket
rm printer.x86 release.zip