home-pods/container-hass-mosquitto.se...

28 lines
888 B
SYSTEMD

[Unit]
Description=Podman container-mosquitto.service
Wants=network-online.target
After=network-online.target
BindsTo=pod-home-assistant.service
After=pod-home-assistant.service
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon --replace -d \
--name=hass-mosquitto \
--pod-id-file %t/pod-home-assistant.pod-id \
-v hass-mosquitto-config:/mosquitto/config \
-v hass-mosquitto-data:/mosquitto/data \
--label "io.containers.autoupdate=registry" \
--net=host \
docker.io/eclipse-mosquitto
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target