![Eric Le Bihan](/assets/img/avatar_default.png)
Add a systemd service file to start dhcpd. The network interfaces to listen on can be set via the variable INTERFACES in /etc/default/dhcpd.conf. Example: INTERFACES="eth0 eth1" Also install a tmpfiles.d file to create /var/lib/dhcp/dhcpd.leases (needed at dhcpd start-up). Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14 lines
255 B
Desktop File
14 lines
255 B
Desktop File
[Unit]
|
|
Description=DHCP server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
PIDFile=/run/dhcpd.pid
|
|
ExecStart=/usr/sbin/dhcpd -q -pf /run/dhcpd.pid $INTERFACES
|
|
KillSignal=SIGINT
|
|
EnvironmentFile=/etc/default/dhcpd.conf
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|