diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index a786c11e1..cdfa44b26 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -412,13 +412,13 @@ function do_as_unbound_user($cmd) { mwexec("/usr/sbin/unbound -c {$g['unbound_chroot_path']}/unbound.conf"); break; case "stop": - mwexec("echo '/usr/sbin/unbound-control stop' | /usr/bin/su -m unbound", true); + mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-control stop", true); break; case "unbound-anchor": - mwexec("echo '/usr/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key' | /usr/bin/su -m unbound", true); + mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key", true); break; case "unbound-control-setup": - mwexec("echo '/usr/sbin/unbound-control-setup -d {$g['unbound_chroot_path']}' | /usr/bin/su -m unbound", true); + mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-control-setup -d {$g['unbound_chroot_path']}", true); break; default: break; diff --git a/src/www/services_unbound.php b/src/www/services_unbound.php index 8ec4b3c58..4aa0a6a3f 100644 --- a/src/www/services_unbound.php +++ b/src/www/services_unbound.php @@ -386,7 +386,7 @@ function show_advanced_dns() { - +
@@ -410,8 +410,8 @@ function show_advanced_dns() { - - + +
')" class="btn btn-default btn-xs">')" class="btn btn-default btn-xs">
@@ -450,7 +450,7 @@ function show_advanced_dns() { - +
@@ -472,8 +472,8 @@ function show_advanced_dns() { - - + +
')" class="btn btn-default btn-xs">')" class="btn btn-default btn-xs">