/etc/init/isc-dhcp-server6.conf is in isc-dhcp-server 4.2.4-7ubuntu12.
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | description "ISC DHCP IPv6 server"
author "Stéphane Graber <stgraber@ubuntu.com>"
start on runlevel [2345]
stop on runlevel [!2345]
pre-start script
if [ ! -f /etc/default/isc-dhcp-server ]; then
echo "/etc/default/isc-dhcp-server does not exist! - Aborting..."
echo "Run 'dpkg-reconfigure isc-dhcp-server' to fix the problem."
stop
exit 0
fi
. /etc/default/isc-dhcp-server
if [ -f /etc/ltsp/dhcpd6.conf ]; then
CONFIG_FILE=/etc/ltsp/dhcpd6.conf
else
CONFIG_FILE=/etc/dhcp/dhcpd6.conf
fi
if [ ! -f $CONFIG_FILE ]; then
echo "$CONFIG_FILE does not exist! - Aborting..."
echo "Please create and configure $CONFIG_FILE to fix the problem."
stop
exit 0
fi
if ! dhcpd -user dhcpd -group dhcpd -t -q -6 -cf $CONFIG_FILE > /dev/null 2>&1; then
echo "dhcpd self-test failed. Please fix the config file."
echo "The error was: "
dhcpd -user dhcpd -group dhcpd -t -6 -cf $CONFIG_FILE
stop
exit 0
fi
end script
respawn
script
if [ -f /etc/ltsp/dhcpd6.conf ]; then
CONFIG_FILE=/etc/ltsp/dhcpd6.conf
else
CONFIG_FILE=/etc/dhcp/dhcpd6.conf
fi
. /etc/default/isc-dhcp-server
# Allow dhcp server to write lease and pid file as 'dhcpd' user
mkdir -p /var/run/dhcp-server
chown dhcpd:dhcpd /var/run/dhcp-server
# The leases files need to be root:root even when dropping privileges
[ -e /var/lib/dhcp/dhcpd6.leases ] || touch /var/lib/dhcp/dhcpd6.leases
chown root:root /var/lib/dhcp /var/lib/dhcp/dhcpd6.leases
if [ -e /var/lib/dhcp/dhcpd6.leases~ ]; then
chown root:root /var/lib/dhcp/dhcpd6.leases~
fi
exec dhcpd -user dhcpd -group dhcpd -f -q -6 -pf /run/dhcp-server/dhcpd6.pid -cf $CONFIG_FILE $INTERFACES
end script
|