Bug #7326 » unbound-stop.diff
| src/etc/inc/services.inc | ||
|---|---|---|
|
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');
|
||
|
/* Stop Unbound using TERM */
|
||
|
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 {
|
||
| ... | ... | |
|
$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", "KILL");
|
||
|
}
|
||
|
}
|
||
|
if (!platform_booting() && $restart_dhcp) {
|
||
- « Previous
- 1
- 2
- 3
- Next »