Files
HomeServerCTs/CT-Files/pihole/Scripts/FirstRun.sh
Bram Prieshof 4d0585b02e CT jenkins, x2go,pihole: Fixes for Debian 13
jenkins: Added missing packages  &  Fixed broken curl for getting current version  of GoLang
pihole: will now run a Gravity update on first setup,  to avoid errors  in the webUI
Readme  fixes for: collabora, domoticz & docker
2025-10-31 21:54:25 +01:00

19 lines
621 B
Bash

#!/bin/bash
read -p "IP for the upstream dns server: " UpStreamDNS1
while true; do
read -p "Add seconndary upstream dns server Y/N? " yn
case $yn in
[Yy]* ) read -p "IP for second the upstream dns server: " UpStreamDNS2;break;;
[Nn]* ) UpStreamDNS2=$UpStreamDNS1;break;;
* ) echo "Please answer yes or no.";;
esac
done
sed -i "/upstreams = \[/,/\]/c\upstreams = [ \"$UpStreamDNS1\" , \"$UpStreamDNS2\" ]" /etc/pihole/pihole.toml
#Finialize instaltation
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended
pihole updateGravity
#Set password
pihole setpassword