unbound: wait for lock to release before stopping #6028

This could under the worst case cause the system to hang forever,
but for the time being in development it would be better to find
the issue than glossing over with a -w 30 or so...
This commit is contained in:
Franco Fichtner 2022-10-20 11:23:04 +02:00
parent 5899fca4bb
commit 208db02afa

View File

@ -102,6 +102,7 @@ function unbound_optimization()
function unbound_service_stop()
{
mwexec('/usr/local/bin/flock -E 0 -o /tmp/unbound_start.lock true');
killbypid('/var/run/unbound_dhcpd.pid', 'TERM', true);
killbypid('/var/run/unbound.pid', 'TERM', true);
mwexecf('/sbin/umount %s', '/var/unbound/dev', true);