Use wait on network to delay the startup (#81)

* Use wait on network to delay the startup

* Update nm.conf

* Create nm.conf

* Update hassos-supervisor.service

* Rename hassos.conf to docker.conf

* Create hassos.conf

* Create hassos.conf

* Update hassos.conf

* aply patch

* Mark only failed

* Fix start order
This commit is contained in:
Pascal Vizeli
2018-07-06 18:21:19 +02:00
committed by GitHub
parent 988d4ebecf
commit 14833a110f
11 changed files with 59 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
[Unit]
RequiresMountsFor=/etc/hostname /etc/hosts /etc/NetworkManager/system-connections

View File

@@ -0,0 +1,2 @@
[Unit]
RequiresMountsFor=/etc/hostname

View File

@@ -1,2 +1,3 @@
[Unit]
After=NetworkManager.service
Wants=network-online.target
After=network-online.target

View File

@@ -0,0 +1,3 @@
[Unit]
Wants=network-online.target
After=network-online.target

View File

@@ -0,0 +1,3 @@
[Unit]
Wants=hassos-supervisor.service
After=hassos-supervisor.service

View File

@@ -0,0 +1,3 @@
[Unit]
Requires=docker.service
After=docker.service

View File

@@ -1,3 +1,3 @@
[Unit]
Requires=docker.service
After=docker.service
Wants=hassos-supervisor.service
After=hassos-supervisor.service

View File

@@ -1,7 +1,8 @@
[Unit]
Description=HassOS supervisor
Requires=docker.service
After=docker.service rauc.service dbus.socket NetworkManager.service
Wants=network-online.target
After=docker.service rauc.service dbus.socket network-online.target
RequiresMountsFor=/mnt/data
StartLimitIntervalSec=60
StartLimitBurst=5

View File

@@ -15,12 +15,12 @@ function mark_bad() {
#### Check system ####
# Docker state
if ! systemctl -q is-active docker; then
if systemctl -q is-failed docker; then
mark_bad
fi
# Docker state
if ! systemctl -q is-active hassos-supervisor; then
if systemctl -q is-failed hassos-supervisor; then
mark_bad
fi