From Fedora Project Wiki

< Networking‎ | Ideas

Revision as of 14:55, 30 July 2014 by Pavlix (talk | contribs) (Created page with "== Network connectivity guidelines for services == 1) Services that require to be started after network is fully configured should pull in network-online.target and order its...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Network connectivity guidelines for services

1) Services that require to be started after network is fully configured should pull in network-online.target and order itself after it.

[Unit]
# Ensure service waits for network connectivity and stops before tearing it down
Wants=network-online.target
After=network-online.target

Note that pulling in network-online.target may extend the overall boot time.

2) Services that don't need to wait for network configuration but would should be stopped before network is taken down should order itself after network.target.

[Unit]
# Ensure service is stopped before tearing down network connectivity
After=network.target

3) Services that don't have any of the requirements above should not reference those targets.