unbound: improve restart experience by waiting for pid to be ready

OpenVPN uses a similar trick already.
This commit is contained in:
Franco Fichtner 2023-03-14 09:28:03 +01:00
parent a59f8666a2
commit e2b7cdae45

View File

@ -378,6 +378,8 @@ function unbound_configure_do($verbose = false, $unused = '')
mwexecf_bg('/usr/local/bin/flock -n -E 0 -o /tmp/unbound_start.lock /usr/local/opnsense/scripts/unbound/start.sh %s', [$domain]);
waitforpid('/var/run/unbound.pid', 10);
service_log("done.\n", $verbose);
}