Several complaints of unbound problems after commiting, so back this out. Revert "Change the way unbound is stopped when the process is being restarted, to give the old process enough time to exit cleanly. Fixes #7326"

This reverts commit 0577d9df46.
This commit is contained in:
jim-p 2017-07-06 08:21:28 -04:00
parent c369871083
commit c59b2bc36d

View File

@ -2289,24 +2289,12 @@ function services_unbound_configure($restart_dhcp = true) {
echo "services_unbound_configure() being called $mt\n";
}
// kill any running Unbound instance
if (file_exists("{$g['varrun_path']}/unbound.pid")) {
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
}
if (isset($config['unbound']['enable'])) {
require_once('/etc/inc/unbound.inc');
/* Attempt to stop unbound nicely */
do_as_unbound_user("stop");
/* kill Unbound if it did not stop cleanly */
if (file_exists("{$g['varrun_path']}/unbound.pid")) {
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
}
/* If unbound is still running, wait up to 30 seconds for it to terminate. */
for ($i=1; $i <= 30; $i++) {
if (is_process_running('unbound')) {
sleep(1);
}
}
if (platform_booting()) {
echo gettext("Starting DNS Resolver...");
} else {
@ -2318,17 +2306,13 @@ function services_unbound_configure($restart_dhcp = true) {
$return = 1;
}
require_once('/etc/inc/unbound.inc');
sync_unbound_service();
if (platform_booting()) {
echo gettext("done.") . "\n";
}
system_dhcpleases_configure();
} else {
/* kill Unbound since it should not be enabled */
if (file_exists("{$g['varrun_path']}/unbound.pid")) {
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
}
}
if (!platform_booting() && $restart_dhcp) {