mirror of
https://abf.rosa.ru/djam/dhcp.git
synced 2025-02-23 13:32:48 +00:00
Fixes to dhcpd services
This commit is contained in:
parent
b95ebd141e
commit
2d1aa8d0d0
3 changed files with 17 additions and 6 deletions
|
@ -18,3 +18,6 @@ CapabilityBoundingSet=~CAP_SYS_ADMIN
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
# This unit file in based on
|
||||||
|
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp
|
||||||
|
|
|
@ -14,7 +14,8 @@ PIDFile=/run/dhcpd/dhcpd.pid
|
||||||
User=isc-dhcpd
|
User=isc-dhcpd
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
|
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
|
||||||
CapabilityBoundingSet=~CAP_SYS_ADMIN
|
CapabilityBoundingSet=~CAP_SYS_ADMIN
|
||||||
ProtectSystem=full
|
# not ProtectSystem=full because we need a writable leases file in /var
|
||||||
|
ProtectSystem=true
|
||||||
ProtectHome=true
|
ProtectHome=true
|
||||||
KillSignal=SIGINT
|
KillSignal=SIGINT
|
||||||
# We pull in network-online.target for a configured network connection.
|
# We pull in network-online.target for a configured network connection.
|
||||||
|
@ -27,3 +28,6 @@ StartLimitInterval=12s
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
# This unit file in based on ROSA's unit file and Arch's
|
||||||
|
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=DHCPv6 Server Daemon
|
Description=DHCPv4 Server Daemon
|
||||||
Documentation=man:dhcpd(8) man:dhcpd.conf(5)
|
Documentation=man:dhcpd(8) man:dhcpd.conf(5)
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
# ldap.service: probably LDAP server starts first and dhcpd must start providing DHCP server only after LDAP has started to use LDAP for IP addresses (?)
|
# ldap.service: probably LDAP server starts first and dhcpd must start providing DHCP server only after LDAP has started to use LDAP for IP addresses (?)
|
||||||
# network-online.target seems unreasonable because network is probsbly not online on the DHCP server in a local network
|
After=network-online.target time-sync.target ldap.service
|
||||||
After=network.target time-sync.target ldap.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=CONFIGFILE=/etc/dhcpd6.conf LEASEFILE=/var/lib/dhcpd/dhcpd6.leases
|
Environment=CONFIGFILE=/etc/dhcpd6.conf LEASEFILE=/var/lib/dhcpd/dhcpd6.leases
|
||||||
|
@ -14,8 +13,10 @@ ExecStart=/usr/sbin/dhcpd -6 -pf /run/dhcpd/dhcpd6.pid -cf $CONFIGFILE -lf $LEAS
|
||||||
PIDFile=/run/dhcpd/dhcpd6.pid
|
PIDFile=/run/dhcpd/dhcpd6.pid
|
||||||
User=isc-dhcpd
|
User=isc-dhcpd
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
|
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
|
||||||
ProtectSystem=full
|
CapabilityBoundingSet=~CAP_SYS_ADMIN
|
||||||
ProtectHome=on
|
# not ProtectSystem=full because we need a writable leases file in /var
|
||||||
|
ProtectSystem=true
|
||||||
|
ProtectHome=true
|
||||||
KillSignal=SIGINT
|
KillSignal=SIGINT
|
||||||
# We pull in network-online.target for a configured network connection.
|
# We pull in network-online.target for a configured network connection.
|
||||||
# However this is not guaranteed to be the network connection our
|
# However this is not guaranteed to be the network connection our
|
||||||
|
@ -27,3 +28,6 @@ StartLimitInterval=12s
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
# This unit file in based on ROSA's unit file and Arch's
|
||||||
|
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/dhcp
|
||||||
|
|
Loading…
Add table
Reference in a new issue