any.sofware.otter: added role

This commit is contained in:
Jef Roosens 2025-12-23 23:20:43 +01:00
parent 09e19680e6
commit 40905a5cbe
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
8 changed files with 143 additions and 0 deletions

View file

@ -0,0 +1,3 @@
otter.roosens.me {
reverse_proxy localhost:8017
}

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
data_dir='/mnt/data1/otter/data'
snapshot_dir="${data_dir}.snapshot"
# Read-only snapshot for atomic backup
btrfs subvolume snapshot -r "$data_dir" "$snapshot_dir" || exit $?
/usr/local/bin/restic backup "$snapshot_dir"
# Always remove snapshot subvolume, even if restic fails
btrfs subvolume delete "$snapshot_dir"

View file

@ -0,0 +1,13 @@
[Unit]
Description=Gpodder.net API implementation
After=network.target network-online.target
[Service]
Type=exec
User=otter
Group=otter
ExecStart=/usr/local/bin/otter serve -c /etc/otter/otter.toml
Restart=always
[Install]
WantedBy=multi-user.target