diff --git a/install/pihole-install.sh b/install/pihole-install.sh index b9100d49..f3c52e90 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -21,6 +21,27 @@ $STD apt-get install -y ufw $STD apt-get install -y ntp msg_ok "Installed Dependencies" +msg_info "Installing Pi-hole" +mkdir -p /etc/pihole/ +cat </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? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Unbound" @@ -79,27 +100,6 @@ EOF msg_ok "Installed Unbound" fi -msg_info "Installing Pi-hole" -mkdir -p /etc/pihole/ -cat </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 customize