Skip to content

Instantly share code, notes, and snippets.

@jasonrm
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonrm/9755658 to your computer and use it in GitHub Desktop.
Save jasonrm/9755658 to your computer and use it in GitHub Desktop.
Wait for systemd-networkd before starting salt-minion
# /etc/systemd/system/salt-minion.service
[Unit]
Description=Salt Minion Daemon
Requires=network.target
After=network.target
[Service]
Type=forking
PIDFile=/run/salt/salt-minion.pid
ExecStart=/usr/bin/salt-minion -d
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/systemd-networkd-wait-online.service
[Unit]
Description=Network Online
Requires=systemd-networkd.service
After=systemd-networkd.service
Before=network.target
ConditionCapability=CAP_NET_ADMIN
[Service]
Type=notify
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online
[Install]
RequiredBy=network.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment