summaryrefslogtreecommitdiff
path: root/src/systemd/isc-dhcp-server6.service
blob: 8ac861d7a7f34d2c8b91825291030c1ed7b30b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Unit]
Description=ISC DHCP IPv6 server
Documentation=man:dhcpd(8)
RequiresMountsFor=/run
ConditionPathExists=/run/dhcp-server/dhcpdv6.conf
After=vyos-router.service

[Service]
Type=forking
WorkingDirectory=/run/dhcp-server
RuntimeDirectory=dhcp-server
RuntimeDirectoryPreserve=yes
Environment=PID_FILE=/run/dhcp-server/dhcpdv6.pid CONFIG_FILE=/run/dhcp-server/dhcpdv6.conf LEASE_FILE=/config/dhcpdv6.leases
PIDFile=/run/dhcp-server/dhcpdv6.pid
ExecStartPre=/bin/sh -ec '\
touch ${LEASE_FILE}; \
chown nobody:nogroup ${LEASE_FILE}* ; \
chmod 664 ${LEASE_FILE}* ; \
/usr/sbin/dhcpd -6 -t -T -q -user nobody -group nogroup -pf ${PID_FILE} -cf ${CONFIG_FILE} -lf ${LEASE_FILE} '
ExecStart=/usr/sbin/dhcpd -6 -q -user nobody -group nogroup -pf ${PID_FILE} -cf ${CONFIG_FILE} -lf ${LEASE_FILE}
Restart=always

[Install]
WantedBy=multi-user.target