2022-02-14 18:11:23 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Podman container-hass-zigbee2mqtt.service
|
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
RequiresMountsFor=%t/containers
|
|
|
|
Requires=container-hass-mosquitto.service
|
|
|
|
After=container-hass-mosquitto.service
|
|
|
|
BindsTo=pod-home-assistant.service
|
|
|
|
After=pod-home-assistant.service
|
|
|
|
|
|
|
|
[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-zigbee2mqtt \
|
|
|
|
--pod-id-file %t/pod-home-assistant.pod-id \
|
2022-07-02 15:04:51 +02:00
|
|
|
-v hass-zigbee2mqtt:/app/data:Z \
|
|
|
|
-v /run/udev:/run/udev:ro \
|
|
|
|
-e TZ=Europe/Brussels \
|
|
|
|
--tz=Europe/Brussels \
|
2022-02-14 18:11:23 +01:00
|
|
|
--device=/dev/ttyACM0:/dev/ttyACM0 \
|
|
|
|
--label "io.containers.autoupdate=registry" \
|
|
|
|
--net=host \
|
|
|
|
docker.io/koenkk/zigbee2mqtt
|
|
|
|
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]
|
2022-07-02 15:04:51 +02:00
|
|
|
WantedBy=default.target
|