Skip to content

Commit ed25f05

Browse files
authored
Add systemd unit files for downstream packagers (#612)
This commit stages some systemd unit files that could serve as a reference for interested users or downstream Linux packagers. There are two files: one to run the daemon itself, and one to set up socket activation. To enable roborev without socket activation you'd do: $ systemctl --user enable --now roborev.service and to enable socket activation, you'd ensure `server_addr = "unix://"` is set in the roborev config, and then $ systemctl --user disable --now roborev.service || true $ systemctl --user enable --now roborev.socket Note that the `ExecStart` entry assumes the roborev binary will be installed in `/usr/bin`, not `~/.local/bin`. I think this is correct for downstream Linux packagers but it might be confusing for end users who want to install these units "manually". Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
1 parent b814db6 commit ed25f05

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

packaging/systemd/roborev.service

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=roborev code review daemon
3+
Documentation=https://github.com/roborev-dev/roborev
4+
5+
[Service]
6+
Type=notify
7+
ExecStart=/usr/bin/roborev daemon run
8+
Restart=on-failure
9+
RestartSec=5
10+
11+
[Install]
12+
WantedBy=default.target

packaging/systemd/roborev.socket

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=roborev daemon socket
3+
4+
[Socket]
5+
ListenStream=%t/roborev/daemon.sock
6+
DirectoryMode=0700
7+
SocketMode=0600
8+
9+
[Install]
10+
WantedBy=sockets.target

0 commit comments

Comments
 (0)