dhcp/dhclient@.service

24 lines
717 B
SYSTEMD
Raw Permalink Normal View History

[Unit]
Description=dhclient on %I
Wants=network.target
Before=network.target
[Service]
ExecStart=/sbin/dhclient -lf /var/lib/dhclient/dhclient.leases -pf /run/dhclient@%i/dhclient.pid -d %I
RuntimeDirectory=dhclient@%i
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
# /var is not read-only
ProtectSystem=true
ProtectHome=true
2018-10-08 13:40:21 +03:00
RestartSec=2s
Restart=on-failure
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
CapabilityBoundingSet=~CAP_SYS_ADMIN
[Install]
WantedBy=multi-user.target
2018-10-08 15:05:48 +03:00
# This unit file in based on
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp