diff options
Diffstat (limited to 'roles/host/files')
| -rw-r--r-- | roles/host/files/check-network-online.service | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/host/files/check-network-online.service b/roles/host/files/check-network-online.service new file mode 100644 index 0000000..afadbfe --- /dev/null +++ b/roles/host/files/check-network-online.service @@ -0,0 +1,14 @@ +#This is needed because user units cannot check or interact with system units such as network-online.target +#https://github.com/containers/podman/issues/22197 +#https://github.com/systemd/systemd/issues/3312 + +[Unit] +Description=Check for system level network-online.target (for users) + +[Service] +Type=oneshot +ExecStart=bash -c 'until systemctl is-active network-online.target; do sleep 1; done' +RemainAfterExit=yes + +[Install] +WantedBy=default.target |
