diff --git a/src/opnsense/scripts/dhcp/unbound_watcher.py b/src/opnsense/scripts/dhcp/unbound_watcher.py index 258894d35..17933eb50 100755 --- a/src/opnsense/scripts/dhcp/unbound_watcher.py +++ b/src/opnsense/scripts/dhcp/unbound_watcher.py @@ -54,10 +54,10 @@ def unbound_control(commands, input=None, output_stream=None): nl='\n' input_string = f'{nl.join(input)}{nl}' + # XXX invoke can fail (non-zero exit code), but unclear why and what to do subprocess.run(['/usr/sbin/chroot', '-u', 'unbound', '-g', 'unbound', '/', '/usr/local/sbin/unbound-control', '-c', '/var/unbound/unbound.conf'] + commands, - input=input_string, stdout=output_stream, stderr=subprocess.STDOUT, - text=True, check=True) + input=input_string, stdout=output_stream, stderr=subprocess.STDOUT, text=True) if output_stream: output_stream.seek(0)