pihole/unbound: create unbound config before apt install to prevent port conflicts (#10839)
* fix(pihole): create unbound config before apt install to prevent port conflict * fix(unbound): create config before apt install to prevent port conflict
This commit is contained in:
committed by
GitHub
parent
e309d871d7
commit
109d6ab6e9
@@ -14,11 +14,7 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Unbound"
|
||||
$STD apt install -y \
|
||||
unbound \
|
||||
unbound-host
|
||||
msg_info "Installed Unbound"
|
||||
|
||||
mkdir -p /etc/unbound/unbound.conf.d
|
||||
cat <<EOF >/etc/unbound/unbound.conf.d/unbound.conf
|
||||
server:
|
||||
interface: 0.0.0.0
|
||||
@@ -52,13 +48,17 @@ server:
|
||||
logfile: /var/log/unbound.log
|
||||
EOF
|
||||
|
||||
$STD apt install -y \
|
||||
unbound \
|
||||
unbound-host
|
||||
|
||||
touch /var/log/unbound.log
|
||||
chown unbound:unbound /var/log/unbound.log
|
||||
sleep 5
|
||||
systemctl restart unbound
|
||||
msg_ok "Installed Unbound"
|
||||
|
||||
msg_ok "Configuring Logrotate"
|
||||
msg_info "Configuring Logrotate"
|
||||
cat <<EOF >/etc/logrotate.d/unbound
|
||||
/var/log/unbound.log {
|
||||
daily
|
||||
@@ -74,7 +74,6 @@ cat <<EOF >/etc/logrotate.d/unbound
|
||||
endscript
|
||||
}
|
||||
EOF
|
||||
|
||||
systemctl restart logrotate
|
||||
msg_ok "Configured Logrotate"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user