aboutsummaryrefslogtreecommitdiff
path: root/roles/host/files
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2024-08-27 17:34:55 -0400
committerspmfox <spmfox@foxwd.com>2024-08-27 17:34:55 -0400
commit5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 (patch)
tree598ff2c8b51948091ffa1eb1fbb6ef6f7b26b776 /roles/host/files
parent4aa6b11581718f66e711bf26fbb41e96fa3a4661 (diff)
converting to roles, converting from runlabels to quadlet ~ breaking change
Diffstat (limited to 'roles/host/files')
-rw-r--r--roles/host/files/check-network-online.service14
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