summaryrefslogtreecommitdiffstats
path: root/systemd/dyndhcpd@.service
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-10-10 15:17:41 +0200
committerGravatar Christian Hesse <mail@eworm.de>2017-10-10 15:17:41 +0200
commit9b6b1520f273d46b3f8d229ee1be28a68e93bc15 (patch)
tree526e93ad5c89046f4624f3b943828d85ffefe8e4 /systemd/dyndhcpd@.service
parent93e4d8ba275fe28225cabfed8435f08b03a61fd8 (diff)
downloaddyndhcpd-9b6b1520f273d46b3f8d229ee1be28a68e93bc15.tar.gz
dyndhcpd-9b6b1520f273d46b3f8d229ee1be28a68e93bc15.tar.zst
start systemd service with dynamic usersystemd-v235
This requires systemd v235 and dhcpd built with '--enable-paranoia'.
Diffstat (limited to 'systemd/dyndhcpd@.service')
-rw-r--r--systemd/dyndhcpd@.service6
1 files changed, 5 insertions, 1 deletions
diff --git a/systemd/dyndhcpd@.service b/systemd/dyndhcpd@.service
index 8aceeb1..25c93cd 100644
--- a/systemd/dyndhcpd@.service
+++ b/systemd/dyndhcpd@.service
@@ -5,7 +5,11 @@ Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
-ExecStart=/usr/bin/dyndhcpd -i%i
+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