mirror of
https://abf.rosa.ru/djam/dhcp.git
synced 2025-02-23 13:32:48 +00:00
20 lines
614 B
Desktop File
20 lines
614 B
Desktop File
[Unit]
|
|
Description=dhclient on %I
|
|
Wants=network.target
|
|
Before=network.target
|
|
|
|
[Service]
|
|
ExecStart=/usr/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
|
|
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
|