#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