/lib/systemd/system/maas-dhcpd6.service is in maas-dhcp 2.4.0~beta2-6865-gec43e47e6-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | [Unit]
Description=MAAS instance of ISC DHCP server for IPv6
Documentation=man:dhcpd(8)
Wants=network-online.target
After=network-online.target
After=time-sync.target
BindsTo=maas-rackd.service
ConditionPathExists=/var/lib/maas/dhcpd6.conf
ConditionPathExists=/var/lib/maas/dhcpd6-interfaces
[Service]
# Allow dhcp server to write lease and pid file as 'dhcpd' user
ExecStartPre=/bin/mkdir -p /run/maas/dhcp
# The leases files need to be root:dhcpd even when dropping privileges
ExecStartPre=/bin/mkdir -p /var/lib/maas/dhcp
# Start the daemon
ExecStart=/bin/sh -ec '\
INTERFACES=$(cat /var/lib/maas/dhcpd6-interfaces); \
LEASES_FILE=/var/lib/maas/dhcp/dhcpd6.leases; \
[ -e $LEASES_FILE ] || touch $LEASES_FILE; \
/usr/sbin/maas-dhcp-helper clean $LEASES_FILE; \
chown root:dhcpd /var/lib/maas/dhcp $LEASES_FILE; \
chmod 775 /var/lib/maas/dhcp ; chmod 664 $LEASES_FILE; \
exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/maas/dhcp/dhcpd6.pid \
-cf /var/lib/maas/dhcpd6.conf -lf $LEASES_FILE $INTERFACES'
[Install]
WantedBy=multi-user.target
|