From 208db02afa68c083dbcb93a3a9d7e6ae17b8f3d2 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 20 Oct 2022 11:23:04 +0200 Subject: [PATCH] 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... --- src/etc/inc/plugins.inc.d/unbound.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index fd05d50ba..2714814cb 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -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);