Per this question and its answers, I've added the following to my service file:
Wants=network-online.target After=docker.service network.target network-online.target
I've also run:
systemctl enable NetworkManager-wait-online.service systemd-networkd-wait-online.service
And yet my
ExecStartPre task which uses
git pull origin master still fails because of what appears to be a connectivity issue.
Mar 22 16:17:21 COMPUTER git: ssh: Could not resolve hostname github.com: Name or service not known Mar 22 16:17:21 COMPUTER git: fatal: Could not read from remote repository.
Am I missing something obvious? Is there another service I need to wait for in order to use
git pull? (In case it's relevant, I'm using Ubuntu 16.10 and systemd 231.)