From a7a66dcf3d68fd272b16cc972ee2bc2153bc0782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Sun, 7 Jun 2026 18:12:55 +0000 Subject: [PATCH] add cross-seed to seedbox --- cookbooks/base/discover-virtiofs-tags.service | 16 +++++++ cookbooks/base/tmpfiles.d/base.conf | 1 - cookbooks/base/var-lib-virtiofs-data.mount | 7 +-- .../config/examples/smb.conf.d/10-shares.conf | 19 -------- cookbooks/samba/samba.container | 7 ++- cookbooks/seedbox/README.md | 14 ++++++ cookbooks/seedbox/cross-seed.container | 33 +++++++++++++ cookbooks/seedbox/cross-seed.image | 6 +++ .../dropins/samba.container.d/seedbox.conf | 6 +++ .../seedbox.conf | 2 + cookbooks/seedbox/flaresolverr.container | 4 +- cookbooks/seedbox/jellyfin.container | 12 ++--- cookbooks/seedbox/lidarr.container | 12 ++--- cookbooks/seedbox/other/samba/10-shares.conf | 6 +-- .../seedbox/other/traefik/cross-seed.yaml | 13 +++++ cookbooks/seedbox/other/traefik/jellyfin.yaml | 3 -- cookbooks/seedbox/other/traefik/lidarr.yaml | 3 -- cookbooks/seedbox/other/traefik/prowlarr.yaml | 3 -- .../seedbox/other/traefik/qbittorrent.yaml | 3 -- cookbooks/seedbox/other/traefik/radarr.yaml | 3 -- cookbooks/seedbox/other/traefik/sonarr.yaml | 3 -- cookbooks/seedbox/prowlarr.container | 12 ++--- cookbooks/seedbox/qbittorrent.container | 16 +++---- cookbooks/seedbox/radarr.container | 12 ++--- cookbooks/seedbox/seedbox.target | 4 +- cookbooks/seedbox/sonarr.container | 12 ++--- cookbooks/seedbox/tmpfiles.d/seedbox.conf | 47 ++++++++++--------- cookbooks/seedbox/var-lib-virtiofs-hdd.mount | 16 +++++++ cookbooks/seedbox/var-lib-virtiofs-ssd.mount | 16 +++++++ 29 files changed, 198 insertions(+), 113 deletions(-) create mode 100644 cookbooks/base/discover-virtiofs-tags.service delete mode 100644 cookbooks/samba/config/examples/smb.conf.d/10-shares.conf create mode 100644 cookbooks/seedbox/cross-seed.container create mode 100644 cookbooks/seedbox/cross-seed.image create mode 100644 cookbooks/seedbox/dropins/samba.container.d/seedbox.conf create mode 100644 cookbooks/seedbox/dropins/var-lib-virtiofs-data.mount.d/seedbox.conf create mode 100644 cookbooks/seedbox/other/traefik/cross-seed.yaml create mode 100644 cookbooks/seedbox/var-lib-virtiofs-hdd.mount create mode 100644 cookbooks/seedbox/var-lib-virtiofs-ssd.mount diff --git a/cookbooks/base/discover-virtiofs-tags.service b/cookbooks/base/discover-virtiofs-tags.service new file mode 100644 index 0000000..6e089be --- /dev/null +++ b/cookbooks/base/discover-virtiofs-tags.service @@ -0,0 +1,16 @@ +[Unit] +Description=Discover the virtiofs tags made available by the hypervisor +RequiresMountsFor=/run +ConditionPathIsMountPoint=/run + +# Unless DefaultDependencies= is set to false, service units will implicitly +# have dependencies of type Requires= and After= on basic.target as well as +# dependencies of type Conflicts= and Before= on shutdown.target. +# +# So, we need to set DefaultDependencies to "no" to break the ordering cycle. +DefaultDependencies=no + +[Service] +Type=oneshot +ExecStart=/bin/bash -Eeuo pipefail -c 'shopt -s nullglob; mkdir -p /run/quadlets/base/virtiofs; for tagfile in /sys/fs/virtiofs/*/tag; do tag=$(<"$tagfile"); echo -n > "/run/quadlets/base/virtiofs/$tag"; done' +RemainAfterExit=yes diff --git a/cookbooks/base/tmpfiles.d/base.conf b/cookbooks/base/tmpfiles.d/base.conf index dac5a9d..d6f1a16 100644 --- a/cookbooks/base/tmpfiles.d/base.conf +++ b/cookbooks/base/tmpfiles.d/base.conf @@ -1,2 +1 @@ d /var/lib/virtiofs 0755 0 0 - -d /var/lib/virtiofs/data 0755 0 0 - diff --git a/cookbooks/base/var-lib-virtiofs-data.mount b/cookbooks/base/var-lib-virtiofs-data.mount index d0d129c..ff5459e 100644 --- a/cookbooks/base/var-lib-virtiofs-data.mount +++ b/cookbooks/base/var-lib-virtiofs-data.mount @@ -1,9 +1,10 @@ [Unit] Description=Mount the "data" virtio filesystem +Requires=discover-virtiofs-tags.service +After=discover-virtiofs-tags.service -# Only run on Fedora CoreOS -ConditionOSRelease=ID=fedora -ConditionOSRelease=VARIANT_ID=coreos +# Only run if the "data" tag is present (as discovered by discover-virtiofs-tags.service) +ConditionPathExists=/run/quadlets/base/virtiofs/data [Mount] What=data diff --git a/cookbooks/samba/config/examples/smb.conf.d/10-shares.conf b/cookbooks/samba/config/examples/smb.conf.d/10-shares.conf deleted file mode 100644 index 723700a..0000000 --- a/cookbooks/samba/config/examples/smb.conf.d/10-shares.conf +++ /dev/null @@ -1,19 +0,0 @@ -server string = Storage - -[foo] -path = /data/foo -comment = Foo -valid users = @itix -write list = @itix -group = itix -directory mask = 0770 -create mask = 0660 - -[bar] -path = /data/bar -comment = Bar -valid users = @itix -write list = @itix -group = itix -directory mask = 0775 -create mask = 0664 diff --git a/cookbooks/samba/samba.container b/cookbooks/samba/samba.container index c3e39f8..8c2df1a 100644 --- a/cookbooks/samba/samba.container +++ b/cookbooks/samba/samba.container @@ -1,8 +1,7 @@ [Unit] Description=Samba -After=samba-build.service -Wants=samba-build.service -Requires=var-lib-virtiofs-data.mount +After=network.target samba-build.service +Wants=network.target samba-build.service # Start/stop this unit when the target is started/stopped PartOf=samba.target @@ -23,11 +22,11 @@ User=0 # Storage Volume=/var/lib/quadlets/samba/data:/var/lib/samba:Z Volume=/var/lib/quadlets/samba/log:/var/log/samba:Z -Volume=/var/lib/virtiofs/data/storage:/data Volume=/etc/quadlets/samba/smb.conf.d:/etc/samba/smb.conf.d:Z Volume=/run/quadlets/samba/passwd:/etc/passwd:Z Volume=/run/quadlets/samba/group:/etc/group:Z Volume=/run/quadlets/samba/shadow:/etc/shadow:Z +# Heads up ! You need to mount the volumes you want to share in a drop-in configuration file ! # Network Network=host diff --git a/cookbooks/seedbox/README.md b/cookbooks/seedbox/README.md index d70fd8a..8ad3e37 100644 --- a/cookbooks/seedbox/README.md +++ b/cookbooks/seedbox/README.md @@ -13,6 +13,7 @@ This cookbook includes the following services: - **Prowlarr**: Indexer manager for Radarr, Sonarr, and Lidarr. - **Jellyfin**: Media server for streaming your collection. - **FlareSolverr**: Proxy server to bypass Cloudflare protection for indexers. +- **cross-seed**: Automatically cross-seeds your torrents on other private trackers using your existing data. All services: @@ -48,6 +49,19 @@ You should see all services starting up. Access the web interfaces: - **Prowlarr**: `http://127.0.0.1:9696/` - **Jellyfin**: `http://127.0.0.1:8096/` - **FlareSolverr**: `http://127.0.0.1:8191/` +- **cross-seed**: `http://127.0.0.1:2468/` + +On its first start, **cross-seed** generates a template configuration file at +`/var/lib/virtiofs/ssd/cross-seed/config/config.js`. Edit it by hand to set at +least: + +- `torznab`: your Prowlarr Torznab indexer URL(s) (with their API keys), e.g. `http://prowlarr:9696/1/api?apikey=`. +- `torrentClients`: the qBittorrent connection string, e.g. `qbittorrent:http://:@localhost:8080`. +- `linkDirs`: `["/data/storage/seed"]`, so that cross-seed hardlinks matches into the dedicated `seed` directory shared with qBittorrent. + +Then restart **cross-seed.service** for the changes to take effect. See the +[cross-seed documentation](https://www.cross-seed.org/docs/basics/getting-started) +for the full set of options. Restart the **seedbox.target** unit. diff --git a/cookbooks/seedbox/cross-seed.container b/cookbooks/seedbox/cross-seed.container new file mode 100644 index 0000000..0652bf9 --- /dev/null +++ b/cookbooks/seedbox/cross-seed.container @@ -0,0 +1,33 @@ +[Unit] +Description=Fully automatic cross-seeding for torrent trackers +Documentation=https://www.cross-seed.org/docs/basics/getting-started +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd + +[Container] +ContainerName=cross-seed + +# Image +Image=cross-seed.image +AutoUpdate=registry + +# Security +User=10017 +Group=10000 + +# Storage +Volume=/var/lib/virtiofs/ssd/cross-seed/config:/config:z +Volume=/var/lib/virtiofs/hdd:/data:z + +# Network +AddCapability=CAP_NET_BIND_SERVICE +Network=host + +# Configuration +Environment=TZ=Etc/UTC HOME=/config +Exec=daemon + +[Install] +WantedBy=seedbox.target diff --git a/cookbooks/seedbox/cross-seed.image b/cookbooks/seedbox/cross-seed.image new file mode 100644 index 0000000..b1d170d --- /dev/null +++ b/cookbooks/seedbox/cross-seed.image @@ -0,0 +1,6 @@ +[Unit] +Description=podman pull ghcr.io/cross-seed/cross-seed +Documentation=https://www.cross-seed.org/docs/basics/getting-started + +[Image] +Image=ghcr.io/cross-seed/cross-seed:latest diff --git a/cookbooks/seedbox/dropins/samba.container.d/seedbox.conf b/cookbooks/seedbox/dropins/samba.container.d/seedbox.conf new file mode 100644 index 0000000..db9f1e8 --- /dev/null +++ b/cookbooks/seedbox/dropins/samba.container.d/seedbox.conf @@ -0,0 +1,6 @@ +[Unit] +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd + +[Container] +Volume=/var/lib/virtiofs/hdd:/data:z diff --git a/cookbooks/seedbox/dropins/var-lib-virtiofs-data.mount.d/seedbox.conf b/cookbooks/seedbox/dropins/var-lib-virtiofs-data.mount.d/seedbox.conf new file mode 100644 index 0000000..5d3e4df --- /dev/null +++ b/cookbooks/seedbox/dropins/var-lib-virtiofs-data.mount.d/seedbox.conf @@ -0,0 +1,2 @@ +[Unit] +# TODO: Désactiver cette unité. diff --git a/cookbooks/seedbox/flaresolverr.container b/cookbooks/seedbox/flaresolverr.container index c8dda02..dfbe48a 100644 --- a/cookbooks/seedbox/flaresolverr.container +++ b/cookbooks/seedbox/flaresolverr.container @@ -1,8 +1,8 @@ [Unit] Description=Proxy server to bypass Cloudflare protection Documentation=https://github.com/FlareSolverr/FlareSolverr/ -Wants=network-online.target -After=network-online.target +Wants=network.target +After=network.target [Container] ContainerName=flaresolverr diff --git a/cookbooks/seedbox/jellyfin.container b/cookbooks/seedbox/jellyfin.container index aa9a1b5..c4a7c85 100644 --- a/cookbooks/seedbox/jellyfin.container +++ b/cookbooks/seedbox/jellyfin.container @@ -1,10 +1,10 @@ [Unit] Description= The Free Software Media System Documentation=https://docs.linuxserver.io/images/docker-jellyfin/ -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=jellyfin @@ -18,8 +18,8 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/jellyfin/config:/config:z -Volume=/var/lib/virtiofs/data/storage/media:/data:z +Volume=/var/lib/virtiofs/ssd/jellyfin/config:/config:z +Volume=/var/lib/virtiofs/hdd/media:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/lidarr.container b/cookbooks/seedbox/lidarr.container index 1be350c..d4adbcd 100644 --- a/cookbooks/seedbox/lidarr.container +++ b/cookbooks/seedbox/lidarr.container @@ -1,10 +1,10 @@ [Unit] Description=Smart PVR for newsgroup and bittorrent users. Documentation=https://docs.linuxserver.io/images/docker-lidarr/ -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=lidarr @@ -18,8 +18,8 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/lidarr/config:/config:z -Volume=/var/lib/virtiofs/data/storage:/data:z +Volume=/var/lib/virtiofs/ssd/lidarr/config:/config:z +Volume=/var/lib/virtiofs/hdd:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/other/samba/10-shares.conf b/cookbooks/seedbox/other/samba/10-shares.conf index 021fb5d..7a01197 100644 --- a/cookbooks/seedbox/other/samba/10-shares.conf +++ b/cookbooks/seedbox/other/samba/10-shares.conf @@ -1,7 +1,7 @@ server string = Seedbox [media] -path = /data/storage/media +path = /data/media comment = Media valid users = @itix write list = @itix @@ -10,7 +10,7 @@ directory mask = 0775 create mask = 0664 [downloads] -path = /data/storage/downloads +path = /data/downloads comment = Downloads valid users = @itix write list = @itix @@ -19,7 +19,7 @@ directory mask = 0775 create mask = 0664 [import] -path = /data/storage/import +path = /data/import comment = Imports valid users = @itix write list = @itix diff --git a/cookbooks/seedbox/other/traefik/cross-seed.yaml b/cookbooks/seedbox/other/traefik/cross-seed.yaml new file mode 100644 index 0000000..7c1910f --- /dev/null +++ b/cookbooks/seedbox/other/traefik/cross-seed.yaml @@ -0,0 +1,13 @@ +http: + routers: + cross-seed: + rule: "Host(`cross-seed`)" + entryPoints: + - http + middlewares: + service: "cross-seed" + services: + cross-seed: + loadBalancer: + servers: + - url: "http://127.0.0.1:2468" diff --git a/cookbooks/seedbox/other/traefik/jellyfin.yaml b/cookbooks/seedbox/other/traefik/jellyfin.yaml index e05c8a8..45048a4 100644 --- a/cookbooks/seedbox/other/traefik/jellyfin.yaml +++ b/cookbooks/seedbox/other/traefik/jellyfin.yaml @@ -3,12 +3,9 @@ http: jellyfin: rule: "Host(`jellyfin`)" entryPoints: - #- https - http middlewares: service: "jellyfin" - #tls: - # certResolver: le services: jellyfin: loadBalancer: diff --git a/cookbooks/seedbox/other/traefik/lidarr.yaml b/cookbooks/seedbox/other/traefik/lidarr.yaml index 5e6d4e5..22373d8 100644 --- a/cookbooks/seedbox/other/traefik/lidarr.yaml +++ b/cookbooks/seedbox/other/traefik/lidarr.yaml @@ -3,12 +3,9 @@ http: lidarr: rule: "Host(`lidarr`)" entryPoints: - #- https - http middlewares: service: "lidarr" - #tls: - # certResolver: le services: lidarr: loadBalancer: diff --git a/cookbooks/seedbox/other/traefik/prowlarr.yaml b/cookbooks/seedbox/other/traefik/prowlarr.yaml index 239144b..42c0817 100644 --- a/cookbooks/seedbox/other/traefik/prowlarr.yaml +++ b/cookbooks/seedbox/other/traefik/prowlarr.yaml @@ -3,12 +3,9 @@ http: prowlarr: rule: "Host(`prowlarr`)" entryPoints: - #- https - http middlewares: service: "prowlarr" - #tls: - # certResolver: le services: prowlarr: loadBalancer: diff --git a/cookbooks/seedbox/other/traefik/qbittorrent.yaml b/cookbooks/seedbox/other/traefik/qbittorrent.yaml index bc44426..7c580aa 100644 --- a/cookbooks/seedbox/other/traefik/qbittorrent.yaml +++ b/cookbooks/seedbox/other/traefik/qbittorrent.yaml @@ -3,12 +3,9 @@ http: qbittorrent-webui: rule: "Host(`qbittorrent`)" entryPoints: - #- https - http middlewares: service: "qbittorrent-webui" - #tls: - # certResolver: le services: qbittorrent-webui: loadBalancer: diff --git a/cookbooks/seedbox/other/traefik/radarr.yaml b/cookbooks/seedbox/other/traefik/radarr.yaml index a3b8cb1..c91440f 100644 --- a/cookbooks/seedbox/other/traefik/radarr.yaml +++ b/cookbooks/seedbox/other/traefik/radarr.yaml @@ -3,12 +3,9 @@ http: radarr: rule: "Host(`radarr`)" entryPoints: - #- https - http middlewares: service: "radarr" - #tls: - # certResolver: le services: radarr: loadBalancer: diff --git a/cookbooks/seedbox/other/traefik/sonarr.yaml b/cookbooks/seedbox/other/traefik/sonarr.yaml index 4478bfb..e0dcbd4 100644 --- a/cookbooks/seedbox/other/traefik/sonarr.yaml +++ b/cookbooks/seedbox/other/traefik/sonarr.yaml @@ -3,12 +3,9 @@ http: sonarr: rule: "Host(`sonarr`)" entryPoints: - #- https - http middlewares: service: "sonarr" - #tls: - # certResolver: le services: sonarr: loadBalancer: diff --git a/cookbooks/seedbox/prowlarr.container b/cookbooks/seedbox/prowlarr.container index 3ef045b..0c99ef8 100644 --- a/cookbooks/seedbox/prowlarr.container +++ b/cookbooks/seedbox/prowlarr.container @@ -1,10 +1,10 @@ [Unit] Description=Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps. Documentation=https://docs.linuxserver.io/images/docker-prowlarr/ -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=prowlarr @@ -18,8 +18,8 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/prowlarr/config:/config:z -Volume=/var/lib/virtiofs/data/storage:/data:z +Volume=/var/lib/virtiofs/ssd/prowlarr/config:/config:z +Volume=/var/lib/virtiofs/hdd:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/qbittorrent.container b/cookbooks/seedbox/qbittorrent.container index 004a760..058150c 100644 --- a/cookbooks/seedbox/qbittorrent.container +++ b/cookbooks/seedbox/qbittorrent.container @@ -1,9 +1,9 @@ [Unit] Description=qBittorrent client -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=qbittorrent @@ -17,11 +17,9 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/qbittorrent/config:/config:z -Volume=/var/lib/virtiofs/data/storage:/data:z - -# This volume is required for torrents migrated from the old seedbox -Volume=/var/lib/virtiofs/data/storage/downloads:/downloads:z +Volume=/var/lib/virtiofs/ssd/qbittorrent/config:/config:z +Volume=/var/lib/virtiofs/ssd/qbittorrent/incomplete:/incomplete:z +Volume=/var/lib/virtiofs/hdd:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/radarr.container b/cookbooks/seedbox/radarr.container index 50d7443..773b9fc 100644 --- a/cookbooks/seedbox/radarr.container +++ b/cookbooks/seedbox/radarr.container @@ -1,10 +1,10 @@ [Unit] Description=Radarr is a movie collection manager for Usenet and BitTorrent users. Documentation=https://docs.linuxserver.io/images/docker-radarr/ -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=radarr @@ -18,8 +18,8 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/radarr/config:/config:z -Volume=/var/lib/virtiofs/data/storage:/data:z +Volume=/var/lib/virtiofs/ssd/radarr/config:/config:z +Volume=/var/lib/virtiofs/hdd:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/seedbox.target b/cookbooks/seedbox/seedbox.target index d4a74b2..4cdd50d 100644 --- a/cookbooks/seedbox/seedbox.target +++ b/cookbooks/seedbox/seedbox.target @@ -1,8 +1,8 @@ [Unit] Description=Seedbox Service Target Documentation=man:systemd.target(5) -Requires=radarr.service sonarr.service lidarr.service prowlarr.service qbittorrent.service jellyfin.service flaresolverr.service -After=radarr.service sonarr.service lidarr.service prowlarr.service qbittorrent.service jellyfin.service flaresolverr.service +Requires=radarr.service sonarr.service lidarr.service prowlarr.service qbittorrent.service jellyfin.service flaresolverr.service cross-seed.service +After=radarr.service sonarr.service lidarr.service prowlarr.service qbittorrent.service jellyfin.service flaresolverr.service cross-seed.service # Allow isolation - can stop/start this target independently AllowIsolate=yes diff --git a/cookbooks/seedbox/sonarr.container b/cookbooks/seedbox/sonarr.container index f76aaf4..dd360df 100644 --- a/cookbooks/seedbox/sonarr.container +++ b/cookbooks/seedbox/sonarr.container @@ -1,10 +1,10 @@ [Unit] Description=Smart PVR for newsgroup and bittorrent users. Documentation=https://docs.linuxserver.io/images/docker-sonarr/ -Wants=network-online.target -After=network-online.target -RequiresMountsFor=/var/lib/virtiofs/data -ConditionPathIsMountPoint=/var/lib/virtiofs/data +Wants=network.target +After=network.target +RequiresMountsFor=/var/lib/virtiofs/ssd +RequiresMountsFor=/var/lib/virtiofs/hdd [Container] ContainerName=sonarr @@ -18,8 +18,8 @@ User=10017 Group=10000 # Storage -Volume=/var/lib/virtiofs/data/sonarr/config:/config:z -Volume=/var/lib/virtiofs/data/storage:/data:z +Volume=/var/lib/virtiofs/ssd/sonarr/config:/config:z +Volume=/var/lib/virtiofs/hdd:/data:z # Network AddCapability=CAP_NET_BIND_SERVICE diff --git a/cookbooks/seedbox/tmpfiles.d/seedbox.conf b/cookbooks/seedbox/tmpfiles.d/seedbox.conf index 4d46be9..8cf1918 100644 --- a/cookbooks/seedbox/tmpfiles.d/seedbox.conf +++ b/cookbooks/seedbox/tmpfiles.d/seedbox.conf @@ -1,22 +1,25 @@ -d$ /var/lib/virtiofs/data/storage 0755 0 0 - -d$ /var/lib/virtiofs/data/storage/media 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/media/movies 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/media/series 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/media/music 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/downloads 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/torrents 0775 10017 10000 - -d$ /var/lib/virtiofs/data/storage/import 0775 10017 10000 - -d$ /var/lib/virtiofs/data/radarr 0700 10017 10000 - -d$ /var/lib/virtiofs/data/radarr/config 0700 10017 10000 - -d$ /var/lib/virtiofs/data/radarr/config/tmp 0700 10017 10000 - -d$ /var/lib/virtiofs/data/radarr/config/xdg 0700 10017 10000 - -d$ /var/lib/virtiofs/data/sonarr 0700 10017 10000 - -d$ /var/lib/virtiofs/data/sonarr/config 0700 10017 10000 - -d$ /var/lib/virtiofs/data/sonarr/config/tmp 0700 10017 10000 - -d$ /var/lib/virtiofs/data/sonarr/config/xdg 0700 10017 10000 - -d$ /var/lib/virtiofs/data/prowlarr 0700 10017 10000 - -d$ /var/lib/virtiofs/data/prowlarr/config 0700 10017 10000 - -d$ /var/lib/virtiofs/data/prowlarr/config/tmp 0700 10017 10000 - -d$ /var/lib/virtiofs/data/prowlarr/config/xdg 0700 10017 10000 - -d$ /var/lib/virtiofs/data/jellyfin 0700 10017 10000 - -d$ /var/lib/virtiofs/data/jellyfin/config 0700 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage 0755 0 0 - +d$ /var/lib/virtiofs/hdd/storage/media 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/media/movies 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/media/series 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/media/music 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/downloads 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/torrents 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/seed 0775 10017 10000 - +d$ /var/lib/virtiofs/hdd/storage/import 0775 10017 10000 - +d$ /var/lib/virtiofs/ssd/radarr 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/radarr/config 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/radarr/config/tmp 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/radarr/config/xdg 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/sonarr 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/sonarr/config 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/sonarr/config/tmp 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/sonarr/config/xdg 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/prowlarr 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/prowlarr/config 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/prowlarr/config/tmp 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/prowlarr/config/xdg 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/jellyfin 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/jellyfin/config 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/cross-seed 0700 10017 10000 - +d$ /var/lib/virtiofs/ssd/cross-seed/config 0700 10017 10000 - diff --git a/cookbooks/seedbox/var-lib-virtiofs-hdd.mount b/cookbooks/seedbox/var-lib-virtiofs-hdd.mount new file mode 100644 index 0000000..4a22f5a --- /dev/null +++ b/cookbooks/seedbox/var-lib-virtiofs-hdd.mount @@ -0,0 +1,16 @@ +[Unit] +Description=Mount the "hdd" virtio filesystem +Requires=discover-virtiofs-tags.service +After=discover-virtiofs-tags.service + +# Only run if the "hdd" tag is present (as discovered by discover-virtiofs-tags.service) +ConditionPathExists=/run/quadlets/base/virtiofs/hdd + +[Mount] +What=hdd +Where=/var/lib/virtiofs/hdd +Type=virtiofs +Options=context=system_u:object_r:container_file_t:s0 + +[Install] +WantedBy=local-fs.target diff --git a/cookbooks/seedbox/var-lib-virtiofs-ssd.mount b/cookbooks/seedbox/var-lib-virtiofs-ssd.mount new file mode 100644 index 0000000..41bbb41 --- /dev/null +++ b/cookbooks/seedbox/var-lib-virtiofs-ssd.mount @@ -0,0 +1,16 @@ +[Unit] +Description=Mount the "ssd" virtio filesystem +Requires=discover-virtiofs-tags.service +After=discover-virtiofs-tags.service + +# Only run if the "ssd" tag is present (as discovered by discover-virtiofs-tags.service) +ConditionPathExists=/run/quadlets/base/virtiofs/ssd + +[Mount] +What=ssd +Where=/var/lib/virtiofs/ssd +Type=virtiofs +Options=context=system_u:object_r:container_file_t:s0 + +[Install] +WantedBy=local-fs.target