rss2email: Use volume mounts for subscriptions

This commit updates to the latest version of RSS2Email, and uses
`podman volume mount` rather than ephemeral containers for affecting
changes.
This commit is contained in:
Alex Palaistras 2022-07-11 21:20:55 +01:00
parent 219ac6f1bb
commit bef546cb79
2 changed files with 5 additions and 11 deletions

View File

@ -1,5 +1,5 @@
FROM docker.io/debian:bullseye-slim
ARG VERSION=4a088c7efe1c76fa1ebe842adc8e2a796df8f313
ARG VERSION=4fa34da9fbfcaa5e5496b13c4bdd17362c383568
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates git gettext gosu \

View File

@ -1,20 +1,14 @@
[Unit]
Description=RSS Feed Subscription for %I
Wants=container-build@rss2email.service
After=container-build@rss2email.service
[Service]
Type=oneshot
RemainAfterExit=true
SyslogIdentifier=%N
ExecStart=/bin/podman run --rm --entrypoint /bin/bash \
--volume rss2email-feeds:/etc/rss2email/conf.d:z \
localhost/rss2email:latest -c \
"printf '[feed.%%s]\nurl = %I\n' $(md5sum <<< '%i' | cut -c-32) > /etc/rss2email/conf.d/%i.conf"
ExecStop=/bin/podman run --rm --entrypoint /bin/bash \
--volume rss2email-feeds:/etc/rss2email/conf.d:z \
localhost/rss2email:latest -c \
"rm -f /etc/rss2email/conf.d/%i.conf"
ExecStart=/bin/sh -c "V=$(podman volume mount rss2email-feeds) && printf '[feed.%%s]\nurl = %I\n' $(md5sum <<< '%i' | cut -c-32) > $V/%i.conf"
ExecStartPost=/bin/podman volume unmount rss2email-feeds
ExecStop=/bin/sh -c "V=$(podman volume mount rss2email-feeds) && rf -f $V/%i.conf"
ExecStopPost=/bin/podman volume unmount rss2email-feeds
[Install]
WantedBy=multi-user.target