Files
operating-system/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service
Stefan Agner 2d3119ef22 Delay Supervisor start until time has been sychronized (#1360)
* Enable systemd-time-wait-sync.service by default

Enable the systemd-time-wait-sync.service by default. This allows to use
the time-sync.target which allows to make sure services only get started
once the time is synchronized.

* Make sure time is synchronized when starting  hassos-supervisor.service

Use the time-sync.target to make sure that the Supervisor gets stsarted
after the time has been synchronized.

* Set timeout for systemd-time-wait-sync.service

Don't delay startup forever in case time synchronization doesn't work.
This allows to boot the system even without Internet connection.
2021-05-12 17:47:42 +02:00

22 lines
651 B
Desktop File

[Unit]
Description=HassOS supervisor
Requires=docker.service rauc.service dbus.service
Wants=network-online.target hassos-apparmor.service time-sync.target
After=docker.service rauc.service dbus.service network-online.target time-sync.target
RequiresMountsFor=/mnt/data /mnt/boot /mnt/overlay
StartLimitIntervalSec=60
StartLimitBurst=5
ConditionPathExists=/run/dbus/system_bus_socket
ConditionPathExists=/run/docker.sock
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStartPre=-/usr/bin/docker stop hassio_supervisor
ExecStart=/usr/sbin/hassos-supervisor
ExecStop=-/usr/bin/docker stop hassio_supervisor
[Install]
WantedBy=multi-user.target