diff --git a/Makefile b/Makefile index 3bfc49c7e..6805bd88d 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,7 @@ CORE_DEPENDS?= apinger \ sudo \ suricata \ syslogd \ + unbound \ voucher \ wol \ zip diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index a6648eb2c..bdbbc89d5 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -388,21 +388,22 @@ function sync_unbound_service() } // Execute commands as the user unbound -function do_as_unbound_user($cmd) { +function do_as_unbound_user($cmd) +{ global $g; switch ($cmd) { - case "start": - mwexec("/usr/sbin/unbound -c {$g['unbound_chroot_path']}/unbound.conf"); + case 'start': + mwexec("/usr/local/sbin/unbound -c {$g['unbound_chroot_path']}/unbound.conf"); break; - case "stop": - mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-control stop", true); + case 'stop': + mwexec("chroot -u unbound -g unbound / /usr/local/sbin/unbound-control stop", true); break; - case "unbound-anchor": - mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key", true); + case 'unbound-anchor': + mwexec("chroot -u unbound -g unbound / /usr/local/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key", true); break; - case "unbound-control-setup": - mwexec("chroot -u unbound -g unbound / /usr/sbin/unbound-control-setup -d {$g['unbound_chroot_path']}", true); + case 'unbound-control-setup': + mwexec("chroot -u unbound -g unbound / /usr/local/sbin/unbound-control-setup -d {$g['unbound_chroot_path']}", true); break; default: break; diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index b9af1ebf4..79a874140 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -3346,16 +3346,6 @@ function upgrade_110_to_111() { global $config; - /* Make sure unbound user exist */ - mwexec('/usr/sbin/pw groupadd -n unbound -g 59', true); - mwexec('/usr/sbin/pw useradd -n unbound -c "Unbound DNS Resolver" -d /var/unbound -s /usr/sbin/nologin -u 59 -g 59', true); - - /* cleanup old unbound package stuffs */ - @unlink('/usr/local/www/unbound_status.php'); - @unlink('/usr/local/www/unbound_acls.php'); - @unlink('/usr/local/bin/unbound_monitor.sh'); - @unlink('/usr/local/etc/rc.d/unbound.sh'); - /* Remove old menu and service entries */ if (isset($config['installedpackages']['menu']) && is_array($config['installedpackages']['menu'])) { foreach ($config['installedpackages']['menu'] as $idx => $menu) {