. /etc/sysconfig/rc
. $rc_functions
+
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+eval $(/usr/local/bin/readhash /var/ipfire/dhcp/settings)
function flush_chains() {
iptables -F DHCPGREENINPUT
boot_mesg "Starting DHCP Server..."
loadproc /usr/sbin/dhcpd -q ${devices}
+ # Start Unbound DHCP Lease Bridge unless RFC2136 is used
+ if [ "${DNS_UPDATE_ENABLED}" != on ]; then
+ boot_mesg "Starting Unbound DHCP Leases Bridge..."
+ loadproc /usr/sbin/unbound-dhcp-leases-bridge -d
+ fi
+
(sleep 5 && chmod 644 /var/run/dhcpd.pid) & # Fix because silly dhcpd creates its pid with mode 640
;;
echo_ok;
exit 0
fi
+
+ boot_mesg "Stopping Unbound DHCP Leases Bridge..."
+ killproc /usr/sbin/unbound-dhcp-leases-bridge
;;
reload)
status)
statusproc /usr/sbin/dhcpd
+ statusproc /usr/sbin/unbound-dhcp-leases-bridge
;;
*)
# Description : Unbound DNS resolver boot script for IPfire
# Author : Marcel Lorenz <marcel.lorenz@ipfire.org>
-#
-# Comment : This init script additional starts the dhcpd watcher daemon
-# if DNS-Update (RFC2136) in web interface enabled
. /etc/sysconfig/rc
. ${rc_functions}
case "$1" in
start)
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
- eval $(/usr/local/bin/readhash /var/ipfire/dhcp/settings)
# Create control keys at first run
if [ ! -r "/etc/unbound/unbound_control.key" ]; then
# Update any known forwarding name servers
update_forwarders
-
- # Start Unbound DHCP Lease Bridge unless RFC2136 is used
- if [ "${DNS_UPDATE_ENABLED}" != on ]; then
- boot_mesg "Starting Unbound DHCP Leases Bridge..."
- loadproc /usr/sbin/unbound-dhcp-leases-bridge -d
- fi
;;
stop)
- boot_mesg "Stopping Unbound DHCP Leases Bridge..."
- killproc /usr/sbin/unbound-dhcp-leases-bridge
-
boot_mesg "Stopping Unbound DNS Proxy..."
killproc /usr/sbin/unbound
;;
status)
statusproc /usr/sbin/unbound
- statusproc /usr/sbin/unbound-dhcp-leases-bridge
;;
update-forwarders)