ansible-edda/playbooks/roles/services/deploy/cloud/templates/systemd/container-cloud-chown.service.j2

29 lines
1.3 KiB
Django/Jinja

[Unit]
Description=Podman container-cloud-chown.service
Documentation=man:podman-generate-systemd(1)
After=pod-cloud.service
Before=container-cloud-nextcloud.service container-cloud-cron.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-cloud-chown.pid %t/container-cloud-chown.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-cloud-chown.pid \
--cidfile %t/container-cloud-chown.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--replace \
-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \
--user=0 \
--entrypoint="/bin/bash" \
--name=pod-cloud-chown \
docker.io/library/nextcloud:{{ services_deploy_versions.cloud.nextcloud }} \
-c "chown -R www-data:www-data /media/external"
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-chown.ctr-id
Type=oneshot
[Install]
WantedBy=container-cloud-nextcloud.service container-cloud-cron.service