restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
943 stars 140 forks source link

Support running on demand via systemd #151

Closed fd0 closed 3 years ago

fd0 commented 3 years ago

What is the purpose of this change? What does it change?

This change allows rest-server to be run on demand by systemd (socket activation). The rationale for supporting both is as follows:

  1. On demand running with a listening socket opened externally is a good idea because then rest-server does not have to have the privileges to listen on a port.
  2. My first choice for that would be systemd (so the process can even be restricted further), but it is not available for non-Linux systems

Was the change discussed in an issue or in the forum before?

Closes #126 Supersedes #127

Checklist

fd0 commented 3 years ago

inetd mode is off: https://github.com/restic/rest-server/issues/126#issuecomment-900565603