2013-07-31 23:22:01 +04:00
[Unit]
Description = DHCPv4 Server Daemon
2018-10-06 01:29:04 +03:00
Documentation = man:dhcpd(8) man:dhcpd.conf(5)
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 (?)
After = network-online.target time-sync.target ldap.service
2013-07-31 23:22:01 +04:00
[Service]
2014-06-17 16:24:23 +04:00
Environment = CONFIGFILE=/etc/dhcpd.conf LEASEFILE=/var/lib/dhcpd/dhcpd.leases
EnvironmentFile = -/etc/sysconfig/dhcpd
Type = forking
ExecStart = /usr/sbin/dhcpd -pf /run/dhcpd/dhcpd.pid -cf $CONFIGFILE -lf $LEASEFILE $OPTIONS $INTERFACES
2018-10-06 01:29:04 +03:00
PIDFile = /run/dhcpd/dhcpd.pid
User = isc-dhcpd
AmbientCapabilities = CAP_NET_BIND_SERVICE CAP_NET_RAW
2018-10-08 14:55:47 +03:00
CapabilityBoundingSet = ~CAP_SYS_ADMIN
2018-10-08 15:05:48 +03:00
# not ProtectSystem=full because we need a writable leases file in /var
ProtectSystem = true
2018-10-08 14:52:23 +03:00
ProtectHome = true
2018-10-06 01:29:04 +03:00
KillSignal = SIGINT
# We pull in network-online.target for a configured network connection.
# However this is not guaranteed to be the network connection our
# networks are configured for. So try to restart on failure with a delay
# of two seconds. Rate limiting kicks in after 12 seconds.
RestartSec = 2s
Restart = on-failure
StartLimitInterval = 12s
2013-07-31 23:22:01 +04:00
[Install]
WantedBy = multi-user.target
2018-10-08 15:05:48 +03:00
# 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