diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index f17207139..9a3a18589 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -353,21 +353,6 @@ include: /var/unbound/domainoverrides.conf {$forward_conf} -### -# Remote Control Config -### -include: /var/unbound/remotecontrol.conf - -EOD; - - copy('/usr/local/etc/inc/plugins.inc.d/unbound/root.min.hints', '/var/unbound/root.hints'); - file_put_contents('/var/unbound/unbound.conf', $unboundconf); -} - -function unbound_remote_control_setup() -{ - if (!file_exists('/var/unbound/remotecontrol.conf') || !file_exists('/var/unbound/unbound_control.key')) { - $remotcfg = << ${CACHE} + ${UNBOUNDCTL} dump_cache > ${CACHE} elif [ "${COMMAND}" = "load" -a -f "${CACHE}" ]; then cat ${CACHE} | ${UNBOUNDCTL} load_cache elif [ "${COMMAND}" = "flush" ]; then diff --git a/src/opnsense/scripts/unbound/wrapper.py b/src/opnsense/scripts/unbound/wrapper.py index b3af3d247..1d5605afe 100755 --- a/src/opnsense/scripts/unbound/wrapper.py +++ b/src/opnsense/scripts/unbound/wrapper.py @@ -36,7 +36,7 @@ import json def unbound_control_reader(action): with tempfile.NamedTemporaryFile() as output_stream: - subprocess.call(['/usr/sbin/unbound-control', '-c', '/var/unbound/remotecontrol.conf', action], + subprocess.call(['/usr/local/sbin/unbound-control', '-c', '/var/unbound/unbound.conf', action], stdout=output_stream, stderr=open(os.devnull, 'wb')) output_stream.seek(0) for line in output_stream: