add sample systemd files
This commit is contained in:
parent
f690d10ead
commit
86925ae262
3 changed files with 116 additions and 0 deletions
18
contrib/systemd/cubby.user.service
Normal file
18
contrib/systemd/cubby.user.service
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Cubby in-memory key-value cache (per-user)
|
||||
Documentation=https://git.juancwu.dev/juancwu/cubby
|
||||
After=default.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# Path to the cubby binary. Build with:
|
||||
# go build -o ~/.local/bin/cubby ./cmd/cubby
|
||||
ExecStart=%h/.local/bin/cubby -socket %t/cubby.sock
|
||||
# %t expands to $XDG_RUNTIME_DIR (e.g. /run/user/1000), which is private to
|
||||
# the user, so the default 0600 socket permissions are fine.
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=2s
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue