diff --git a/libs/rm2fb/Server.cpp b/libs/rm2fb/Server.cpp index 1ef79c7..012ef13 100644 --- a/libs/rm2fb/Server.cpp +++ b/libs/rm2fb/Server.cpp @@ -254,6 +254,7 @@ serverMain(int argc, char* argv[], char** envp) { // NOLINT std::vector pollfds; std::cout << "rm2fb-server started!\n"; + sd_notify(0, "READY=1"); while (running) { pollfds.clear(); pollfds.reserve(tcpClients.size() + fixedFdNum); diff --git a/libs/rm2fb/rm2fb.service b/libs/rm2fb/rm2fb.service index cfd69b0..9d7063e 100644 --- a/libs/rm2fb/rm2fb.service +++ b/libs/rm2fb/rm2fb.service @@ -4,8 +4,10 @@ StartLimitIntervalSec=600 StartLimitBurst=4 Before=xochitl.service launcher.service remarkable-reboot.service remarkable-shutdown.service After=opt.mount +ConditionFileNotEmpty=/opt/lib/librm2fb_server.so [Service] +Type=notify Restart=on-failure RestartSec=5 ExecStart=/usr/bin/xochitl