blob: 57b1cb30fc0161cab562152f5c5e691833ba5662 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# (C) 2013-2020 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
[Unit]
Description=IPv4 DHCP server for interface %i
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device network.target network-online.target systemd-networkd.service
Wants=network-online.target
[Service]
ExecStart=!/usr/bin/dyndhcpd --interface %i --user %p-%i --pidfile /run/%p@%i/dhcpd.pid --leases /var/lib/%p@%i/dhcp.leases --write-config /run/%p@%i/dhcpd.conf
RuntimeDirectory=%p@%i
StateDirectory=%p@%i
User=%p-%i
DynamicUser=on
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on
RestartSec=2s
Restart=on-failure
StartLimitInterval=12s
[Install]
WantedBy=multi-user.target
|