From 604623a136fc7b8eaa704f3962d886ba84cf1333 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 21 Jul 2014 18:56:07 -0300 Subject: Make dhcpleases use unbound pid when it's configured --- etc/inc/system.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 3f23694..82036e4 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -359,7 +359,11 @@ function system_dhcpleases_configure() { if (is_process_running("dhcpleases")) mwexec('/bin/pkill dhcpleases'); @unlink("{$g['varrun_path']}/dhcpleases.pid"); - mwexec("/usr/local/sbin/dhcpleases -l {$g['dhcpd_chroot_path']}/var/db/dhcpd.leases -d {$config['system']['domain']} -p {$g['varrun_path']}/dnsmasq.pid -h {$g['varetc_path']}/hosts"); + if (isset($config['unbound']['enable'])) + $dns_pid = "unbound.pid"; + else + $dns_pid = "dnsmasq.pid"; + mwexec("/usr/local/sbin/dhcpleases -l {$g['dhcpd_chroot_path']}/var/db/dhcpd.leases -d {$config['system']['domain']} -p {$g['varrun_path']}/{$dns_pid} -h {$g['varetc_path']}/hosts"); } } else { sigkillbypid("{$g['varrun_path']}/dhcpleases.pid", "TERM"); -- cgit v1.1