2022-02-14 18:11:23 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Podman pod-home-assistant.service
|
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
RequiresMountsFor=
|
2022-07-02 15:04:51 +02:00
|
|
|
Requires=container-hass-app.service container-hass-zigbee2mqtt.service container-hass-mosquitto.service
|
|
|
|
Before=container-hass-app.service container-hass-zigbee2mqtt.service container-hass-mosquitto.service
|
2022-02-14 18:11:23 +01:00
|
|
|
Requires=container-hass-app.service container-hass-zigbee2mqtt.service container-hass-mosquitto.service container-hass-postgres.service
|
|
|
|
Before=container-hass-app.service container-hass-zigbee2mqtt.service container-hass-mosquitto.service container-hass-postgres.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=70
|
|
|
|
ExecStartPre=/bin/rm -f %t/pod-home-assistant.pid %t/pod-home-assistant.pod-id
|
2022-07-02 15:04:51 +02:00
|
|
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-home-assistant.pid --pod-id-file %t/pod-home-assistant.pod-id --network=host --device=/dev/ttyACM0:/dev/ttyACM0 --name home-assistant --replace
|
2022-02-14 18:11:23 +01:00
|
|
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-home-assistant.pod-id
|
|
|
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-home-assistant.pod-id -t 10
|
|
|
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-home-assistant.pod-id
|
|
|
|
PIDFile=%t/pod-home-assistant.pid
|
|
|
|
Type=forking
|
|
|
|
|
|
|
|
[Install]
|
2022-07-02 15:04:51 +02:00
|
|
|
WantedBy=default.target
|