Fortunately, the unbound-control-setup script is not interactive and produce all the 4 files needed. I've only add this to unbound.postinst :
/usr/sbin/unbound-control-setup >/dev/null 2>&1 && chown root:unbound /etc/unbound/unbound_{control,server}.{key,pem}
I've merge the 2 patches for convenience.
Fortunately, the unbound- control- setup script is not interactive and produce all the 4 files needed. I've only add this to unbound.postinst :
/usr/sbin/ unbound- control- setup >/dev/null 2>&1 && chown root:unbound /etc/unbound/ unbound_ {control, server} .{key,pem}
I've merge the 2 patches for convenience.