Rearranged the unbound install script to be after the pi-hole install. because for some reason the pihole install gives an error

pull/2425/head
Bram Suurd 2 years ago
parent 1562a847cc
commit 4a1c8f47ab
  1. 44
      install/pihole-install.sh

@ -21,6 +21,27 @@ $STD apt-get install -y ufw
$STD apt-get install -y ntp $STD apt-get install -y ntp
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Pi-hole"
mkdir -p /etc/pihole/
cat <<EOF >/etc/pihole/setupVars.conf
PIHOLE_INTERFACE=eth0
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
CACHE_SIZE=10000
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSMASQ_LISTENING=local
WEBPASSWORD=$(openssl rand -base64 48)
BLOCKING_ENABLED=true
EOF
# View script https://install.pi-hole.net
$STD bash <(curl -fsSL https://install.pi-hole.net) --unattended
msg_ok "Installed Pi-hole"
read -r -p "Would you like to add Unbound? <y/N> " prompt read -r -p "Would you like to add Unbound? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Unbound" msg_info "Installing Unbound"
@ -41,7 +62,7 @@ server:
edns-buffer-size: 1232 edns-buffer-size: 1232
prefetch: yes prefetch: yes
num-threads: 1 num-threads: 1
private-address: 192.168.0.0/24 private-address: 192.168.0.0/16
private-address: 169.254.0.0/16 private-address: 169.254.0.0/16
private-address: 172.16.0.0/12 private-address: 172.16.0.0/12
private-address: 10.0.0.0/8 private-address: 10.0.0.0/8
@ -57,27 +78,6 @@ EOF
msg_ok "Installed Unbound" msg_ok "Installed Unbound"
fi fi
msg_info "Installing Pi-hole"
mkdir -p /etc/pihole/
cat <<EOF >/etc/pihole/setupVars.conf
PIHOLE_INTERFACE=eth0
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
CACHE_SIZE=10000
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSMASQ_LISTENING=local
WEBPASSWORD=$(openssl rand -base64 48)
BLOCKING_ENABLED=true
EOF
# View script https://install.pi-hole.net
$STD bash <(curl -fsSL https://install.pi-hole.net) --unattended
msg_ok "Installed Pi-hole"
motd_ssh motd_ssh
customize customize

Loading…
Cancel
Save