summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/services.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-07-06 08:20:43 -0400
committerjim-p <jimp@pfsense.org>2017-07-06 08:20:43 -0400
commit6e094e04f7d9634c7151bd9aa68ad93c71584d80 (patch)
tree88fea6fb7abec8d0d69e63daf91f52190bcd5e34 /src/etc/inc/services.inc
parent282b6c666a2f95a51a4b46d89fa80357d2ebccb2 (diff)
downloadpfsense-6e094e04f7d9634c7151bd9aa68ad93c71584d80.zip
pfsense-6e094e04f7d9634c7151bd9aa68ad93c71584d80.tar.gz
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 38d110824c87ff60c6289c0432d55009586ceee4.
Diffstat (limited to 'src/etc/inc/services.inc')
-rw-r--r--src/etc/inc/services.inc28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 104a054..ffc4aa8 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -2235,24 +2235,12 @@ function services_unbound_configure($restart_dhcp = true) {
echo "services_unbound_configure() being called $mt\n";
}
- 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);
- }
- }
+ // 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'])) {
if (platform_booting()) {
echo gettext("Starting DNS Resolver...");
} else {
@@ -2264,17 +2252,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) {
OpenPOWER on IntegriCloud