Skip to content

Commit

Permalink
Notify systemd that the service is started
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored and timower committed Jun 11, 2024
1 parent b26e9c2 commit c9e51d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/rm2fb/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ serverMain(int argc, char* argv[], char** envp) { // NOLINT
const auto fixedFdNum = 1 + (tcpFd.has_value() ? 1 : 0);
std::vector<pollfd> pollfds;

sd_notify(0, "READY=1");
std::cout << "rm2fb-server started!\n";

while (running) {
pollfds.clear();
pollfds.reserve(tcpClients.size() + fixedFdNum);
Expand Down
2 changes: 2 additions & 0 deletions libs/rm2fb/rm2fb.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9e51d1

Please sign in to comment.